-
Notifications
You must be signed in to change notification settings - Fork 0
World Pointer
[VRTK_WorldPointer]
This abstract class provides any game pointer the ability to know the
the state of the implemented pointer. It extends the
VRTK_DestinationMarker to allow for destination events to be emitted
when the pointer cursor collides with objects.
The World Pointer also provides a play area cursor to be displayed for all cursors that utilise this class. The play area cursor is a representation of the current calibrated play area space and is useful for visualising the potential new play area space in the game world prior to teleporting. It can also handle collisions with objects on the new play area space and prevent teleporting if there are any collisions with objects at the potential new destination.
The play area collider does not work well with terrains as they are uneven and cause collisions regularly so it is recommended that handling play area collisions is not enabled when using terrains.
The following script parameters are available:
- Enable Teleport: If this is checked then the teleport flag is set to true in the Destination Set event so teleport scripts will know whether to action the new destination. This allows controller beams to be enabled on a controller but never trigger a teleport (if this option is unchecked).
- Pointer Hit Color: The colour of the beam when it is colliding with a valid target. It can be set to a different colour for each controller.
- Pointer Miss Color: The colour of the beam when it is not hitting a valid target. It can be set to a different colour for each controller.
- Show Play Area Cursor: If this is enabled then the play area boundaries are displayed at the tip of the pointer beam in the current pointer colour.
- Play Area Cursor Dimensions: Determines the size of the play area cursor and collider. If the values are left as zero then the Play Area Cursor will be sized to the calibrated Play Area space.
-
Handle Play Area Cursor Collisions: If this is ticked then if
the play area cursor is colliding with any other object then the
pointer colour will change to the
Pointer Miss Colorand theWorldPointerDestinationSetevent will not be triggered, which will prevent teleporting into areas where the play area will collide. - Beam Always On: If this is checked the the pointer beam is always visible but the Destination Set event is still only emitted when the assigned button is pressed.
- Activate Delay: The time in seconds to delay the pointer beam being able to be active again. Useful for preventing constant teleportation.
- Home
- Quick Start
- FAQ/Troubleshooting
- Prefabs
-
Scripts
- Controllers
- Pointers
- Movement
- Interactions
- Examples