You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Tooltip("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.")]
70
+
privateboolignoreCollidersNotInFOV=true;
71
+
/// <summary>
72
+
/// Whether to ignore colliders that may be near the pointer, but not actually in the visual FOV.
73
+
/// This can prevent accidental grabs, and will allow hand rays to turn on when you may be near
74
+
/// a grabbable but cannot see it. Visual FOV is defined by cone centered about display center,
Assert.IsNotNull(spherePointer,"Right hand does not have a sphere pointer");
55
+
Assert.IsTrue(spherePointer.IsInteractionEnabled,"Sphere pointer should be enabled because it is near grabbable cube and visible, even if inside a giant cube.");
56
+
GameObject.Destroy(cube);
57
+
}
58
+
59
+
/// <summary>
60
+
/// Tests that sphere pointer behaves correctly when hand is near grabbable
Assert.IsFalse(spherePointer.IsInteractionEnabled,"Sphere pointer should NOT be enabled because hand is near grabbable but the grabbable is not visible.");
The *[SpherePointer](xref:Microsoft.MixedReality.Toolkit.Input.SpherePointer)* uses [UnityEngine.Physics.OverlapSphere](https://docs.unity3d.com/ScriptReference/Physics.OverlapSphere.html) in order to identify the closest [`NearInteractionGrabbable`](xref:Microsoft.MixedReality.Toolkit.Input.NearInteractionGrabbable) object for interaction, which is useful for "grabbable" input like the `ManipulationHandler`. Similar to the [`PokePointer`](xref:Microsoft.MixedReality.Toolkit.Input.PokePointer)/[`NearInteractionTouchable`](xref:Microsoft.MixedReality.Toolkit.Input.NearInteractionTouchable) functional pair, in order to be interactable with the Sphere Pointer, the game object must contain a component that is the [`NearInteractionGrabbable`](xref:Microsoft.MixedReality.Toolkit.Input.NearInteractionGrabbable) script.
-*Sphere Cast Radius*: The radius for the sphere used to query for grabbable objects.
103
106
-*Grab Layer Masks* - A prioritized array of LayerMasks to determine which possible GameObjects the pointer can interact with and the order of interaction to attempt. Note that a GameObject must also have a `NearInteractionGrabbable` to interact with a SpherePointer.
104
-
105
107
> [!NOTE]
106
108
> The Spatial Awareness layer is disabled in the default GrabPointer prefab provided by MRTK. This is done to reduce performance impact of doing a sphere overlap query with the spatial mesh. You can enable this by modifying the GrabPointer prefab.
109
+
-*Ignore Colliders Not in FOV* - Whether to ignore colliders that may be near the pointer, but not actually in the visual FOV.
110
+
This can prevent accidental grabs, and will allow hand rays to turn on when you may be near
111
+
a grabbable but cannot see it. The *Visual FOV* is defined via a cone instead of the the typical frustum for performance reasons. This cone is centered and oriented the same as the camera's frustum with a radius equal to half display height(or vertical FOV).
0 commit comments