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

JoystickPoseMovement Class

Represents an IMovement that uses joystick input to control the position and rotation of an object.
This class provides methods for moving the object to a target pose, updating the target pose, stopping the movement, and adjusting the pose based on joystick input.

Constructors

JoystickPoseMovement ( controller , moveSpeed , rotationSpeed , minDistance , maxDistance )
Initializes a new instance of the JoystickPoseMovement class.
This constructor sets the movement properties, such as the controller, movement speed, rotation speed, minimum distance, and maximum distance.
Signature
Oculus.Interaction.JoystickPoseMovement.JoystickPoseMovement(IController controller, float moveSpeed, float rotationSpeed, float minDistance, float maxDistance)
Parameters
controller: IController  The controller to use for the movement.
moveSpeed: float  The speed at which to move the object.
rotationSpeed: float  The speed at which to rotate the object.
minDistance: float  The minimum distance along the Z-axis for the grabbed object.
maxDistance: float  The maximum distance along the Z-axis for the grabbed object.

Fields

Pose : Pose
Signature
Pose Oculus.Interaction.JoystickPoseMovement.Pose
Stopped : bool
Signature
bool Oculus.Interaction.JoystickPoseMovement.Stopped

Methods

AdjustPoseWithJoystickInput ()
Adjusts the pose of the movement based on the current joystick input.
This method calculates the movement delta based on the joystick input and adjusts the pose accordingly. It also takes into account the movement speed, rotation speed, minimum distance, and maximum distance.
Signature
void Oculus.Interaction.JoystickPoseMovement.AdjustPoseWithJoystickInput()
Returns
void
InjectController ( controller )
Signature
void Oculus.Interaction.JoystickPoseMovement.InjectController(IController controller)
Parameters
controller: IController
Returns
void
MoveTo ( target )
Moves the object to the specified target pose using the movement speed and rotation speed.
The target pose is used as a reference point to calculate the movement delta.
Signature
void Oculus.Interaction.JoystickPoseMovement.MoveTo(Pose target)
Parameters
target: Pose  The target pose to move to.
Returns
void
StopAndSetPose ( pose )
Stops the movement and sets the current pose to the specified pose.
This method resets the movement state and sets the current pose to the specified value.
Signature
void Oculus.Interaction.JoystickPoseMovement.StopAndSetPose(Pose pose)
Parameters
pose: Pose  The pose to set as the current pose.
Returns
void
Tick ()
Updates the movement based on the current joystick input.
This method adjusts the pose of the object based on the joystick input and movement speed.
Signature
void Oculus.Interaction.JoystickPoseMovement.Tick()
Returns
void
UpdateTarget ( target )
Updates the target pose of the movement to the specified pose.
This method does not affect the current pose of the object.
Signature
void Oculus.Interaction.JoystickPoseMovement.UpdateTarget(Pose target)
Parameters
target: Pose  The new target pose.
Returns
void