class MAGES::ComponentLibrary::AxisRotationMonitor¶
Overview¶
Monitors the rotation around a given axis. If a threshold is exceeded, an event is triggered. More…
class AxisRotationMonitor: public MonoBehaviour { public: // properties Vector3 RotationAxis; float RotationAngle; UnityEvent OnRotationAngleReached; float AccumulatedRotation; // methods void ResetThreshold(); };
Detailed Documentation¶
Monitors the rotation around a given axis. If a threshold is exceeded, an event is triggered.
Properties¶
Vector3 RotationAxis
Gets or sets the rotation axis in parent local space, or world space if there is no parent.
float RotationAngle
Gets or sets the angle around the rotation axis that triggers the event.
UnityEvent OnRotationAngleReached
Gets or sets the event that is triggered when the rotation angle is reached.
float AccumulatedRotation
Gets the accumulated rotation of the object.
Methods¶
void ResetThreshold()
Resets the internal threshold.