Guides
Guides
These docs are for v3.1.0. Click to read the latest docs for v3.3.0.

VRTK_SnapRotateObjectControlAction

extends VRTK_BaseObjectControlAction

Overview

The Snap Rotate Object Control Action script is used to snap rotate the controlled GameObject around the up vector when changing the axis.

The effect is a immediate snap rotation to quickly face in a new direction.

Inspector Parameters

  • Angle Per Snap: The angle to rotate for each snap.
  • Angle Multiplier: The snap angle multiplier to be applied when the modifier button is pressed.
  • Snap Delay: The amount of time required to pass before another snap rotation can be carried out.
  • Blink Transition Speed: The speed for the headset to fade out and back in. Having a blink between rotations can reduce nausia.
  • Axis Threshold: The threshold the listened axis needs to exceed before the action occurs. This can be used to limit the snap rotate to a single axis direction (e.g. pull down to flip rotate). The threshold is ignored if it is 0.

Example

VRTK/Examples/017_CameraRig_TouchpadWalking has a collection of walls and slopes that can be traversed by the user with the touchpad. There is also an area that can only be traversed if the user is crouching.

To enable the Snap Rotate Object Control Action, ensure one of the TouchpadControlOptions children (located under the Controller script alias) has the Snap Rotate control script active.