API reference

RayInteractable Class

Properties

ISurface Surface[Get]
IMovementProvider MovementProvider[Get]
int TiebreakerScore[Get]

Protected Functions

override void Awake ( )
override void Start ( )

Member Functions

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