XR Socket Interactor
Interactor used for holding interactables via a socket. This component is not designed to be attached to a controller (thus does not derive from XRBaseControllerInteractor
, unlike XRDirectInteractor
and XRRayInteractor
) and instead will always attempt to select an interactable that it is hovering over (though will not perform exclusive selection of that interactable).
A socket is defined as the target for a specific interactable, such as a keyhole for a key or a battery socket for a battery. Not to be confused with network programming.
Property | Description |
---|---|
Interaction Manager | The XRInteractionManager that this Interactor will communicate with (will find one if None). |
Interaction Layer Mask | Allows interaction with Interactables whose Interaction Layer Mask overlaps with any Layer in this Interaction Layer Mask. |
Attach Transform | The Transform that is used as the attach point for Interactables.Automatically instantiated and set in Awake if None.Setting this will not automatically destroy the previous object. |
Starting Selected Interactable | The Interactable that this Interactor automatically selects at startup (optional, may be None). |
Keep Selected Target Valid | Whether to keep selecting an Interactable after initially selecting it even when it is no longer a valid target. Enable to make the XRInteractionManager retain the selection even if the Interactable is not contained within the list of valid targets. Disable to make the Interaction Manager clear the selection if it isn't within the list of valid targets.A common use for disabling this is for Ray Interactors used for teleportation to make the teleportation Interactable no longer selected when not currently pointing at it. |
Show Interactable Hover Meshes | Whether this socket should show a mesh at socket's attach point for Interactables that it is hovering over. |
Hover Mesh Material | Material used for rendering interactable meshes on hover (a default material will be created if none is supplied). |
Can't Hover Mesh Material | Material used for rendering interactable meshes on hover when there is already a selected object in the socket (a default material will be created if none is supplied). |
Hover Scale | Scale at which to render hovered Interactable. |
Socket Active | Whether socket interaction is enabled. |
Recycle Delay Time | Sets the amount of time the socket will refuse hovers after an object is removed. |
Interactor Events | See the Interactor Events page. |