Tanoda
|
Public Attributes | |
float | Period = .1f |
HandModelBase | HandModel = null |
Finger.FingerType | FingerName = Finger.FingerType.TYPE_INDEX |
PointingType | PointingType = PointingType.RelativeToHorizon |
Vector3 | PointingDirection = Vector3.forward |
Transform | TargetObject = null |
float | OnAngle = 15f |
float | OffAngle = 25f |
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 when specified fingers are pointing in the specified manner.
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 finger 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 30 of file FingerDirectionDetector.cs.
Finger.FingerType Leap.Unity.FingerDirectionDetector.FingerName = Finger.FingerType.TYPE_INDEX |
The finger to compare to the specified direction.
Definition at line 53 of file FingerDirectionDetector.cs.
HandModelBase Leap.Unity.FingerDirectionDetector.HandModel = null |
The HandModelBase instance to observe. Set automatically if not explicitly set in the editor.
Definition at line 46 of file FingerDirectionDetector.cs.
float Leap.Unity.FingerDirectionDetector.OffAngle = 25f |
The turn-off angle. The detector deactivates when the specified finger points more than this many degrees away from the target direction. The off angle must be larger than the on angle.
Definition at line 106 of file FingerDirectionDetector.cs.
float Leap.Unity.FingerDirectionDetector.OnAngle = 15f |
The turn-on angle. The detector activates when the specified finger points within this many degrees of the target direction.
Definition at line 97 of file FingerDirectionDetector.cs.
float Leap.Unity.FingerDirectionDetector.Period = .1f |
The interval at which to check finger state.
Definition at line 38 of file FingerDirectionDetector.cs.
Vector3 Leap.Unity.FingerDirectionDetector.PointingDirection = Vector3.forward |
The target direction as interpreted by the PointingType setting. Ignored when Pointingtype is "AtTarget."
Definition at line 82 of file FingerDirectionDetector.cs.
PointingType Leap.Unity.FingerDirectionDetector.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 73 of file FingerDirectionDetector.cs.
bool Leap.Unity.FingerDirectionDetector.ShowGizmos = true |
Whether to draw the detector's Gizmos for debugging. (Not every detector provides gizmos.)
Definition at line 112 of file FingerDirectionDetector.cs.
Transform Leap.Unity.FingerDirectionDetector.TargetObject = null |
The object to point at when the PointingType is "AtTarget." Ignored otherwise.
Definition at line 89 of file FingerDirectionDetector.cs.