namespace UnityEngine.XR.Interaction.Toolkit.Locomotion { /// /// Interface for an object that can perform movement of an that is constrained /// by collision based on where the user's body is. /// /// public interface IConstrainedXRBodyManipulator { /// /// The body whose to move. /// /// /// XRMovableBody linkedBody { get; } /// /// Flags indicating the direction of the collision from the most recent call to . /// CollisionFlags lastCollisionFlags { get; } /// /// Whether the is touching the ground, as of the most recent call to . /// bool isGrounded { get; } /// /// Called after the given body links this manipulator to it. The implementation should ensure that /// points to after this method is called. /// /// The body linked with this manipulator. /// /// void OnLinkedToBody(XRMovableBody body); /// /// Called when a body unlinks this manipulator from it. The implementation should ensure that /// returns after this method is called. /// /// /// void OnUnlinkedFromBody(); /// /// Applies the given motion to . A collision can constrain the movement from taking place. /// /// Amount of translation to apply. /// Returns flags that indicate the direction of the collision, if there was one. CollisionFlags MoveBody(Vector3 motion); } }