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

ISnapPoseDelegate Interface

Provides custom snap pose logic for handling tracked and snapped elements in the Interaction SDK.
This interface enables implementing classes to define precise snapping behavior for objects as they move between tracking and snapped states.
The snap pose delegate manages the lifecycle of tracked and snapped elements through distinct states:
  • Tracking: When an element is being actively followed but not yet snapped
  • Snapped: When an element has been locked to a specific pose
  • Movement: Handling pose updates for tracked elements See Oculus.Interaction.SurfaceSnapPoseDelegate and Oculus.Interaction.SequentialSlotsProvider for example implementations.

Methods

MoveTrackedElement ( id , p )
Updates the pose of a tracked element.
This should be called continuously while an element is being tracked to update its position and rotation.
Signature
void Oculus.Interaction.ISnapPoseDelegate.MoveTrackedElement(int id, Pose p)
Parameters
id: int  Unique identifier of the element to update
p: Pose
Returns
void
SnapElement ( id , pose )
Transitions an element from being tracked to being snapped at a specific pose.
This locks the element to the specified position and rotation.
The snap pose may be different from the current tracked pose, allowing for smooth transitions to predefined positions.
Signature
void Oculus.Interaction.ISnapPoseDelegate.SnapElement(int id, Pose pose)
Parameters
id: int  Unique identifier of the element to snap
pose: Pose  Target pose where the element should snap to
Returns
void
SnapPoseForElement ( id , pose , result )
Determines the target snap pose for a given element, if one exists.
This method is used to preview or validate potential snap positions before actually performing the snap operation.
Signature
bool Oculus.Interaction.ISnapPoseDelegate.SnapPoseForElement(int id, Pose pose, out Pose result)
Parameters
id: int  Unique identifier of the element to check
pose: Pose  Current pose of the element
result: out Pose  The calculated snap pose if available
Returns
bool  True if a valid snap pose exists for the element, false otherwise
TrackElement ( id , p )
Begins tracking a new element at the specified pose.
This initiates the tracking state for an element before it potentially snaps to a final position.
This method should be called when an element first becomes eligible for snapping, typically when it enters a snap zone or grab volume.
Signature
void Oculus.Interaction.ISnapPoseDelegate.TrackElement(int id, Pose p)
Parameters
id: int  Unique identifier for the element to track
p: Pose
Returns
void
UnsnapElement ( id )
Releases an element from its snapped state.
This returns the element to a tracked state or releases it completely.
Signature
void Oculus.Interaction.ISnapPoseDelegate.UnsnapElement(int id)
Parameters
id: int  Unique identifier of the element to unsnap
Returns
void
UntrackElement ( id )
Stops tracking an element, removing it from the tracking system.
This should be called when an element is no longer eligible for snapping or needs to be released.
Signature
void Oculus.Interaction.ISnapPoseDelegate.UntrackElement(int id)
Parameters
id: int  Unique identifier of the element to stop tracking
Returns
void