class MAGES::Interaction::SnapTurnProvider¶
Overview¶
A locomotion provider, for providing rotation to the camera using the joystick. More…
class SnapTurnProvider: public MAGES::Interaction::BaseLocomotionProvider { public: // enums enum RotationOrigin; // properties float SnapRotationAngle; RotationOrigin Rotation; // methods void RotateRigAroundCamera(Vector3 axis, float angle); void RotateRig(Vector3 eulers); virtual override void ResetProvider(); };
Inherited Members¶
public:
// properties
ILocomotionSystem LocomotionSystem;
LocomotionPhase LocomotionPhase;
UnityEvent<LocomotionStartEventArgs> LocomotionStarted;
UnityEvent<LocomotionEndEventArgs> LocomotionEnded;
List<ILocomotionProvider> ActiveLocomotionProviders;
ILocomotionSystem LocomotionSystem;
LocomotionPhase LocomotionPhase;
UnityEvent<LocomotionStartEventArgs> LocomotionStarted;
UnityEvent<LocomotionEndEventArgs> LocomotionEnded;
// methods
bool CanStartLocomotion();
bool StartLocomotion(float time);
bool EndLocomotion();
void ResetProvider();
bool CanStartLocomotion();
bool StartLocomotion(float time = 10f);
bool EndLocomotion();
virtual void ResetProvider();
Detailed Documentation¶
A locomotion provider, for providing rotation to the camera using the joystick.
Properties¶
float SnapRotationAngle
Gets or sets the snap rotation angle. Only used when SnapRotation is true.
RotationOrigin Rotation
Gets or sets a value indicating around which object the rig should rotate.
Methods¶
void RotateRigAroundCamera(Vector3 axis, float angle)
Rotates the rig around the camera.
Parameters:
axis |
The rotation axis. |
angle |
The angle in degrees. |
void RotateRig(Vector3 eulers)
Rotates the Rig.
Parameters:
eulers |
The rotation angles of each axis. |
virtual override void ResetProvider()
Resets the locomotion provider to its initial state.