Mastering XR Locomotion: Continuous Move and Turn Providers
In virtual and augmented reality (XR) development, smooth and intuitive locomotion is crucial for user immersion and comfort. Unity's XR Interaction Toolkit provides powerful components to implement various movement styles. This module focuses on two key components for continuous locomotion: the Continuous Move Provider and the Continuous Turn Provider.
Understanding Continuous Movement
Continuous movement refers to locomotion that occurs without discrete steps or teleportation. Instead, the user's avatar moves smoothly through the virtual environment, typically controlled by input devices like joysticks or touchpads. This can enhance the feeling of presence but also carries a higher risk of motion sickness if not implemented carefully.
The Continuous Move Provider
The Continuous Move Provider enables smooth, analog movement in XR.
This component translates analog input (like joystick or thumbstick movement) into continuous forward or backward motion for the XR rig. It allows for variable speeds based on input intensity.
The Continuous Move Provider is a Unity component that attaches to your XR Origin. It listens for input from a specified controller (e.g., the left controller's joystick) and applies a translation to the XR Origin's transform. The speed of this translation is directly proportional to the magnitude of the input. You can configure parameters such as the movement speed, acceleration, and whether the movement is relative to the camera or the controller's forward direction.
Analog input, such as joystick or thumbstick movement.
The Continuous Turn Provider
The Continuous Turn Provider facilitates smooth, analog rotation in XR.
This component translates analog input (like joystick or thumbstick movement) into continuous rotation of the XR rig. It allows for variable turning speeds.
Similar to the Move Provider, the Continuous Turn Provider also attaches to the XR Origin. It interprets analog input from a designated controller (e.g., the right controller's joystick) to rotate the XR rig around its vertical axis. This provides a smooth, analog turning experience. Developers can adjust the turning speed and sensitivity to find a comfortable balance for users.
Continuous rotation of the XR rig around its vertical axis.
Configuring and Combining Providers
Both the Continuous Move Provider and Continuous Turn Provider are typically added to the same GameObject, usually the XR Origin. They work in conjunction with an Input Action Manager to map controller inputs to their respective movement and turning actions. Careful configuration of speed, acceleration, and dead zones is essential for a good user experience and to mitigate potential motion sickness.
Feature | Continuous Move Provider | Continuous Turn Provider |
---|---|---|
Primary Function | Translates analog input to continuous forward/backward motion. | Translates analog input to continuous rotation. |
Input Type | Analog (e.g., joystick X-axis) | Analog (e.g., joystick X-axis) |
Effect on XR Rig | Translates the rig's position. | Rotates the rig's transform. |
Typical Controller Input | Left controller joystick | Right controller joystick |
When implementing continuous locomotion, always consider user comfort. Offering options for turning speed and potentially snap turning (as an alternative) can cater to a wider range of user sensitivities.
Advanced Considerations
Beyond basic configuration, you can explore features like acceleration curves, dead zones for analog inputs, and integrating these providers with other locomotion systems. For instance, you might combine continuous movement with a dash ability or allow users to switch between continuous and snap turning.
Visualizing the XR Origin and its attached locomotion providers helps understand how input translates to movement. The XR Origin is the central point of the player's presence. The Continuous Move Provider influences its position along a forward/backward axis, while the Continuous Turn Provider influences its rotation around the Y-axis. Both are driven by analog stick inputs from VR controllers.
Text-based content
Library pages focus on text content
Learning Resources
Official Unity documentation detailing various locomotion systems, including continuous movement and turning, within the XR Interaction Toolkit.
A guided learning path from Unity Learn that covers setting up and customizing locomotion systems, including continuous providers.
A practical video tutorial demonstrating how to set up and use the Continuous Move Provider in Unity.
A practical video tutorial demonstrating how to set up and use the Continuous Turn Provider in Unity.
An article that breaks down different VR locomotion techniques, providing context for continuous movement and its alternatives.
Essential documentation on how the XR Interaction Toolkit integrates with Unity's new Input System, which is crucial for configuring providers.
Insights from Oculus on designing comfortable and effective VR locomotion, relevant to fine-tuning continuous movement parameters.
Learn how to set up the XR Origin, the foundational GameObject for player presence, to which locomotion providers are attached.
A comparative analysis of different VR locomotion methods, discussing the pros and cons of continuous movement.
Understand the XR Controller component, which is essential for mapping input actions to the locomotion providers.