Skip to content

Player Character

Eruruw edited this page Jan 12, 2024 · 12 revisions

Movement

  • Continuous
    Using the joystick on the VR controllers, the player moves at a constant velocity in the direction 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.

Interaction

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 point [^1] .

  • 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.

Clone this wiki locally