35 [Tooltip(
"Whether to change the transform of the parent object.")]
40 [Tooltip(
"Draw this detector's Gizmos, if any. (Gizmos must be on in Unity edtor, too.)")]
62 protected virtual void Awake() {
64 Debug.LogWarning(
"Detector should not be control the HandModelBase's transform. Either attach it to its own transform or set ControlsTransform to false.");
67 _handModel = GetComponentInParent<HandModelBase>();
69 Debug.LogWarning(
"The HandModel field of Detector was unassigned and the detector has been disabled.");
176 if (shouldBeActive) {
189 protected virtual void OnDrawGizmos () {
202 circleRotation.ToAngleAxis(out angle, out axis);
203 Utils.DrawCircle(centerPosition,
Normal,
Distance / 2, centerColor);
207 Gizmos.DrawLine(centerPosition, centerPosition +
Normal *
Distance / 2);
float LastHoldTime
Returns the value of Time.time during the most recent pinch event.
virtual void changeState(bool shouldBeActive)
abstract void ensureUpToDate()
float LastReleaseTime
Returns the value of Time.time during the most recent unpinch event.
virtual bool IsHolding
Returns whether or not the dectector is currently detecting a pinch or grab.
Quaternion LastActiveRotation
Vector3 LastActiveDirection
Vector3 LastActivePosition
Vector3 Position
Returns the position value of the detected pinch or grab. If a pinch or grab is not currently being d...
virtual bool DidStartHold
Returns whether or not the value of IsHolding changed to true between this frame and the previous.
virtual bool DidChangeFromLastFrame
Returns whether or not the value of IsPinching is different than the value reported during the previo...
Quaternion Rotation
Returns the rotation value of the detected pinch or grab. If a pinch or grab is not currently being d...
virtual bool DidRelease
Returns whether or not the value of IsHolding changed to false between this frame and the previous.
virtual void Deactivate()