API reference
API reference
Select your platform
No SDKs available
No versions available

IMovement Interface

Defines the essential functionalities for movement operations, modifying how an InteractableIInteractable moves when selected by an InteractorIInteractor.
This interface provides methods to initiate, update, and stop movements, as well as to perform per-frame updates to support smooth and responsive interactions.

Properties

Pose : Pose
[Get]
Gets the current pose of the movement.
This property allows developers to retrieve the real-time position and orientation of the object implementing this interface For an example implementation, see FollowTarget.Pose
Signature
Pose Oculus.Interaction.IMovement.Pose
Stopped : bool
[Get]
Indicates whether the movement has stopped.
For an example implementation, see ObjectPull.Stopped
Signature
bool Oculus.Interaction.IMovement.Stopped

Methods

MoveTo ( target )
Moves the object to the specified target pose.
This method is essential for setting the initial target and starting the movement based on the provided pose. For an example implementation, see MoveTowardsTarget.MoveTo
Signature
void Oculus.Interaction.IMovement.MoveTo(Pose target)
Parameters
target: Pose  The target pose to which the object will move.
Returns
void
StopAndSetPose ( pose )
Stops the movement and sets the pose to the specified pose.
This method provides a way to immediately halt any ongoing movement and reset the pose, which can be critical in stopping interactions gracefully when an Interactable is selected or unselected. For an example implementation, see ObjectPull.StopAndSetPose
Signature
void Oculus.Interaction.IMovement.StopAndSetPose(Pose pose)
Parameters
pose: Pose  The pose to set when the movement is stopped.
Returns
void
Tick ()
Updates the movement logic on each frame tick.
This method ensures that the movement logic is processed, keeping the movement consistent with the frame rate. For an example implementation, see ObjectPull.Tick
Signature
void Oculus.Interaction.IMovement.Tick()
Returns
void
UpdateTarget ( target )
Updates the current target to a new pose.
This method allows for dynamic changes to the target during movement, which is useful in scenarios where the target is not static. For an example implementation, see MoveRelativeToTarget.UpdateTarget
Signature
void Oculus.Interaction.IMovement.UpdateTarget(Pose target)
Parameters
target: Pose  The new target pose to which the object will move.
Returns
void