Class SpherePointer
Inheritance
SpherePointer
Implements
MonoBehaviour
IEventSystemHandler
IEqualityComparer
Assembly: cs.temp.dll.dll
public class SpherePointer : BaseControllerPointer, MonoBehaviour, IMixedRealityControllerPoseSynchronizer, IMixedRealitySourcePoseHandler, IMixedRealitySourceStateHandler, IMixedRealityInputHandler, IMixedRealityBaseInputHandler, IMixedRealityInputHandler<float>, IMixedRealityInputHandler<Vector2>, IMixedRealityInputHandler<Vector3>, IMixedRealityInputHandler<Quaternion>, IMixedRealityInputHandler<MixedRealityPose>, IEventSystemHandler, IMixedRealityNearPointer, IMixedRealityPointer, IEqualityComparer
Fields
Declaration
protected QueryTriggerInteraction triggerInteraction
Field Value
Type |
Description |
QueryTriggerInteraction |
|
Declaration
protected QueryTriggerInteraction triggerInteraction
Field Value
Type |
Description |
QueryTriggerInteraction |
|
Properties
The LayerMasks, in prioritized order, that are used to determine the touchable objects.
Declaration
public LayerMask[] GrabLayerMasks { get; }
Property Value
Type |
Description |
LayerMask[] |
|
The LayerMasks, in prioritized order, that are used to determine the touchable objects.
Declaration
public LayerMask[] GrabLayerMasks { get; }
Property Value
Type |
Description |
LayerMask[] |
|
Whether to ignore colliders that may be near the pointer, but not actually in the visual FOV.
This can prevent accidental grabs, and will allow hand rays to turn on when you may be near
a grabbable but cannot see it. Visual FOV is defined by cone centered about display center,
radius equal to half display height.
Declaration
public bool IgnoreCollidersNotInFOV { get; set; }
Property Value
Test if the pointer is within the grabbable radius of collider that's both on a grabbable layer mask, and has a NearInteractionGrabbable.
Uses SphereCastRadius to determine if near an object.
Note: if focus on pointer is locked, will always return true.
Declaration
public override bool IsInteractionEnabled { get; }
Property Value
Type |
Description |
Boolean |
True if the pointer is within the grabbable radius of collider that's both on a grabbable layer mask, and has a NearInteractionGrabbable.
|
Overrides
Test if the pointer is within the grabbable radius of collider that's both on a grabbable layer mask, and has a NearInteractionGrabbable.
Uses SphereCastRadius to determine if near an object.
Note: if focus on pointer is locked, will always return true.
Declaration
public override bool IsInteractionEnabled { get; }
Property Value
Type |
Description |
Boolean |
True if the pointer is within the grabbable radius of collider that's both on a grabbable layer mask, and has a NearInteractionGrabbable.
|
Overrides
Test if the pointer is near any collider that's both on a grabbable layer mask, and has a NearInteractionGrabbable.
Uses SphereCastRadius + NearObjectMargin to determine if near an object.
Declaration
public bool IsNearObject { get; }
Property Value
Type |
Description |
Boolean |
True if the pointer is near any collider that's both on a grabbable layer mask, and has a NearInteractionGrabbable.
|
Test if the pointer is near any collider that's both on a grabbable layer mask, and has a NearInteractionGrabbable.
Uses SphereCastRadius + NearObjectMargin to determine if near an object.
Declaration
public bool IsNearObject { get; }
Property Value
Type |
Description |
Boolean |
True if the pointer is near any collider that's both on a grabbable layer mask, and has a NearInteractionGrabbable.
|
Additional distance on top ofSphereCastRadius when pointer is considered 'near' an object and far interaction will turn off.
Declaration
public float NearObjectMargin { get; }
Property Value
Additional distance on top ofSphereCastRadius when pointer is considered 'near' an object and far interaction will turn off.
Declaration
public float NearObjectMargin { get; }
Property Value
Distance at which the pointer is considered "near" an object.
Declaration
public float NearObjectRadius { get; }
Property Value
Distance at which the pointer is considered "near" an object.
Declaration
public float NearObjectRadius { get; }
Property Value
Maximum number of colliders that can be detected in a scene query.
Declaration
public int SceneQueryBufferSize { get; }
Property Value
Maximum number of colliders that can be detected in a scene query.
Declaration
public int SceneQueryBufferSize { get; }
Property Value
Declaration
public override SceneQueryType SceneQueryType { get; set; }
Property Value
Type |
Description |
SceneQueryType |
|
Overrides
Declaration
public override SceneQueryType SceneQueryType { get; set; }
Property Value
Type |
Description |
SceneQueryType |
|
Overrides
Specify whether queries for grabbable objects hit triggers.
Declaration
public QueryTriggerInteraction TriggerInteraction { get; }
Property Value
Type |
Description |
QueryTriggerInteraction |
|
Specify whether queries for grabbable objects hit triggers.
Declaration
public QueryTriggerInteraction TriggerInteraction { get; }
Property Value
Type |
Description |
QueryTriggerInteraction |
|
Methods
Declaration
public override void OnPreSceneQuery()
Overrides
Declaration
public override void OnPreSceneQuery()
Overrides
Declaration
public bool TryGetDistanceToNearestSurface(out float distance)
Parameters
Type |
Name |
Description |
Single |
distance |
|
Returns
Declaration
public bool TryGetDistanceToNearestSurface(out float distance)
Parameters
Type |
Name |
Description |
Single |
distance |
|
Returns
Gets the position of where grasp happens
For IMixedRealityHand it's the average of index and thumb.
For any other IMixedRealityController, return just the pointer origin
Declaration
public bool TryGetNearGraspPoint(out Vector3 result)
Parameters
Type |
Name |
Description |
Vector3 |
result |
|
Returns
Gets the position of where grasp happens
For IMixedRealityHand it's the average of index and thumb.
For any other IMixedRealityController, return just the pointer origin
Declaration
public bool TryGetNearGraspPoint(out Vector3 result)
Parameters
Type |
Name |
Description |
Vector3 |
result |
|
Returns
Declaration
public bool TryGetNormalToNearestSurface(out Vector3 normal)
Parameters
Type |
Name |
Description |
Vector3 |
normal |
|
Returns
Declaration
public bool TryGetNormalToNearestSurface(out Vector3 normal)
Parameters
Type |
Name |
Description |
Vector3 |
normal |
|
Returns
Implements
MonoBehaviour
IEventSystemHandler
IEqualityComparer