Tanoda
|
Public Attributes | |
float | Period = .1f |
HandModelBase | HandModel = null |
PointingType | PointingType = PointingType.RelativeToHorizon |
Vector3 | PointingDirection = Vector3.forward |
Transform | TargetObject = null |
float | OnAngle = 45 |
float | OffAngle = 65 |
bool | ShowGizmos = true |
![]() | |
UnityEvent | OnActivate |
UnityEvent | OnDeactivate |
Additional Inherited Members | |
![]() | |
virtual void | Activate () |
virtual void | Deactivate () |
![]() | |
Color | OnColor = Color.green |
Color | OffColor = Color.red |
Color | LimitColor = Color.blue |
Color | DirectionColor = Color.white |
Color | NormalColor = Color.gray |
![]() | |
bool | IsActive [get] |
Detects whether the palm of the hand is pointing toward the specified direction. The detector activates when the palm direction is within OnAngle degrees of the desired direction and deactivates when it becomes more than OffAngle degrees.
Directions can be specified relative to the global frame of reference, relative to the camera frame of reference, or using a combination of the two – relative to the camera direction in the x-z plane, but not changing relative to the horizon.
You can alternatively specify a target game object.
If added to a HandModelBase instance or one of its children, this detector checks the palm direction at the interval specified by the Period variable. You can also specify which hand model to observe explicitly by setting handModel in the Unity editor or in code.
Definition at line 33 of file PalmDirectionDetector.cs.
HandModelBase Leap.Unity.PalmDirectionDetector.HandModel = null |
The HandModelBase instance to observe. Set automatically if not explicitly set in the editor.
Definition at line 48 of file PalmDirectionDetector.cs.
float Leap.Unity.PalmDirectionDetector.OffAngle = 65 |
The turn-off angle. The detector deactivates when the palm points more than this many degrees away from the target direction. The off angle must be larger than the on angle.
Definition at line 101 of file PalmDirectionDetector.cs.
float Leap.Unity.PalmDirectionDetector.OnAngle = 45 |
The turn-on angle. The detector activates when the palm points within this many degrees of the target direction.
Definition at line 92 of file PalmDirectionDetector.cs.
float Leap.Unity.PalmDirectionDetector.Period = .1f |
The interval at which to check palm direction.
Definition at line 41 of file PalmDirectionDetector.cs.
Vector3 Leap.Unity.PalmDirectionDetector.PointingDirection = Vector3.forward |
The target direction as interpreted by the PointingType setting. Ignored when Pointingtype is "AtTarget."
Definition at line 76 of file PalmDirectionDetector.cs.
PointingType Leap.Unity.PalmDirectionDetector.PointingType = PointingType.RelativeToHorizon |
Specifies how to interprete the direction specified by PointingDirection.
In VR scenes, RelativeToHorizon with a direction of (0, 0, 1) for camera forward and RelativeToWorld with a direction of (0, 1, 0) for absolute up, are often the most useful settings.
Definition at line 67 of file PalmDirectionDetector.cs.
bool Leap.Unity.PalmDirectionDetector.ShowGizmos = true |
Whether to draw the detector's Gizmos for debugging. (Not every detector provides gizmos.)
Definition at line 108 of file PalmDirectionDetector.cs.
Transform Leap.Unity.PalmDirectionDetector.TargetObject = null |
The object to point at when the PointingType is "AtTarget." Ignored otherwise.
Definition at line 83 of file PalmDirectionDetector.cs.