-
Notifications
You must be signed in to change notification settings - Fork 0
Player Character
- Continuous
Using the joystick on the VR controllers, the player moves at a constant velocity in a direction according to vector input. - Teleportation
Aiming a raycast to the ground and pressing a trigger will instantly teleport the player to that point. This is done through XR Interaction Toolkit's teleport interaction layer.
VRDF.Movement.Beta.mp4
The LocomotionManager script contains a function called "SwitchLocomotion" and is referenced by the settings menu to switch between continuous and teleportation movement types.
-
- Teleportation Provider
- Continuous Move Provider
On update, the ActivateTeleportationRay script checks if the correct parameters are set to display the teleportation rays. The settings menu will toggle the boolean "enable" when switching between movement types.
-
- Left Activate
- Right Activate
- Left Cancel
- Right Cancel
- Enable
-
- Left Activate > 0.1
- Right Activate > 0.1
- Left Cancel = false
- Right Cancel = false
- Enable = true
The player interacts with objects in the environment through two different means, each activated on trigger pull. Both of these interaction methods bring the currently selected object to the same location in the player's hand. This can be modified with an attach point1.
- Direct
Grabs the object directly connected with the player's current hand position. Works how grabbing an object in real life would. - Raycast
Shoots a raycast from the player's current hand position. When the trigger is pressed, whatever object is connected with the raycast will be brought to the player's hand position.
1: Attach Point - This is a transform set as a child node of the object. Using this transform, the exact spot the object is attached to the hand can be changed.