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

RayInteractable Class

Properties

Surface : ISurface
[Get]
Signature
ISurface Oculus.Interaction.RayInteractable.Surface
TiebreakerScore : int
[Get][Set]
Signature
int Oculus.Interaction.RayInteractable.TiebreakerScore

Protected Methods

Awake ()
Signature
override void Oculus.Interaction.RayInteractable.Awake()
Returns
override void
Start ()
Signature
override void Oculus.Interaction.RayInteractable.Start()
Returns
override void

Methods

GenerateMovement ( to , source )
Generates movement to move the <cref="RayInteractable" /> from its current position to the target position.
Signature
IMovement Oculus.Interaction.RayInteractable.GenerateMovement(in Pose to, in Pose source)
Parameters
to: in Pose  The target position.
source: in Pose  The current position.
Returns
IMovement  Returns the movement that will be applied to the interactable.
InjectAllRayInteractable ( surface )
Sets all required values for a <cref="RayInteractable" /> on a dynamically instantiated GameObject.
Signature
void Oculus.Interaction.RayInteractable.InjectAllRayInteractable(ISurface surface)
Parameters
surface: ISurface
Returns
void
InjectOptionalMovementProvider ( provider )
Sets a movement provider for a dynamically instantiated GameObject.
Signature
void Oculus.Interaction.RayInteractable.InjectOptionalMovementProvider(IMovementProvider provider)
Parameters
Returns
void
InjectOptionalSelectSurface ( surface )
Sets a select surface for a dynamically instantiated GameObject.
Signature
void Oculus.Interaction.RayInteractable.InjectOptionalSelectSurface(ISurface surface)
Parameters
surface: ISurface
Returns
void
InjectSurface ( surface )
Sets a surface for a dynamically instantiated GameObject.
Signature
void Oculus.Interaction.RayInteractable.InjectSurface(ISurface surface)
Parameters
surface: ISurface
Returns
void
Raycast ( ray , hit , maxDistance , selectSurface )
Called when the interactor has a set of interactables and is calculating which one is closest.
Signature
bool Oculus.Interaction.RayInteractable.Raycast(Ray ray, out SurfaceHit hit, in float maxDistance, bool selectSurface)
Parameters
ray: Ray  The position and direction of the ray.
hit: out SurfaceHit  The location, normal, and distance of the ray hit.
maxDistance: in float  The maximum ray length.
selectSurface: bool  True if the raycast has hit the selectable part of the <cref="RayInteractable" />, otherwise false.
Returns
bool  Returns true if hit.