LocomotionSystem

  • Used for checking if player is grounded. If it's not, screen will fade black and Footprints will appear on the place player has left the ground

  • Holds references to all objects essential for teleport and continuous locomotion to work

  • Should be placed on input root (OVRCameraRig for Oculus).

Public Properties

Transform Transform

  • Cached transform component

Transform TeleportRayStartLeft

Transform TeleportRayStartRight

  • TeleportRayStarts are created to help stabilize ray casting

Transform CenterEyeAnchor

ScreenFader ScreenFader

TeleportDestination OldTeleportDestination

  • Used to keep track of where player was and invoking events

Public Methods

bool TryGetGroundNormal(out Vector3 groundNormal)

  • Returns true if the camera is above object containing Ground

  • If player is not grounded, groundNormal is equal to Vector3.Zero

Vector3 GetGroundPoint()

  • returns point on the Ground where player is standing.

Last updated