API reference

ColliderSurface Class

Extends MonoBehaviour
The primary solid surface used by the Interaction SDK, this is an ISurface constructed using a Unity Collider to characterize the topology of the surface.
This type is particularly useful for making existing in-scene objects interactable by simply connecting providing a ColliderSurface to represent their existing colliders in Interaction SDK logic.

Fields

Bounds : Bounds
Implementation of IBounds.Bounds; for details, please refer to the related documentation provided for that property.
Signature
Bounds Oculus.Interaction.Surfaces.ColliderSurface.Bounds
Transform : Transform
Implementation of ISurface.Transform; for details, please refer to the related documentation provided for that property.
Signature
Transform Oculus.Interaction.Surfaces.ColliderSurface.Transform

Protected Methods

Start ()
Signature
virtual void Oculus.Interaction.Surfaces.ColliderSurface.Start()
Returns
void

Methods

ClosestSurfacePoint ( point , hit , maxDistance )
Implementation of ISurface.ClosestSurfacePoint(in Vector3, out SurfaceHit, float); for details, please refer to the related documentation provided for that property.
Signature
bool Oculus.Interaction.Surfaces.ColliderSurface.ClosestSurfacePoint(in Vector3 point, out SurfaceHit hit, float maxDistance=0)
Parameters
point: in Vector3
hit: out SurfaceHit
maxDistance: float
Returns
bool
InjectAllColliderSurface ( collider )
Injects all required dependencies for a dynamically instantiated ColliderSurface; effectively wraps InjectCollider(Collider).
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.Surfaces.ColliderSurface.InjectAllColliderSurface(Collider collider)
Parameters
collider: Collider
Returns
void
InjectCollider ( collider )
Sets Unity Collider for a dynamically instantiated ColliderSurface.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.Surfaces.ColliderSurface.InjectCollider(Collider collider)
Parameters
collider: Collider
Returns
void
Raycast ( ray , hit , maxDistance )
Implementation of ISurface.Raycast(in Ray, out SurfaceHit, float); for details, please refer to the related documentation provided for that property.
Signature
bool Oculus.Interaction.Surfaces.ColliderSurface.Raycast(in Ray ray, out SurfaceHit hit, float maxDistance=0)
Parameters
ray: in Ray
hit: out SurfaceHit
maxDistance: float
Returns
bool