Immerse SDK
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Locomotion

Locomotion refers to how you move your avatar around the scene. The AvatarLocomotion component, attached to the avatar prefab, handles input for movement. When pressing the thumbstick forward, a cursor will appear, and releasing the thumbstick will teleport the avatar to the cursor’s location. For screen space users, movement is achieved by clicking on the ground.

The local avatar can also be teleported using the static method AvatarLocomotion.TeleportTo

To enable locomotion, you first need to create a NavMesh. The NavMesh identifies walkable areas that can be teleported to. Additionally, the NavMesh can be used with the ‘Path Mask’ feature, which restricts teleportation to locations that can be reached from the current position (this feature is disabled by default). You can configure teleport settings by adjusting the fields on the AvatarLocomotion component attached to the avatar prefab.