Language
Edit

ProximityDetector Class

Definition

An IInteractionModeDetector that detects nearby interactables.

[UnityEngine.AddComponentMenu("MRTK/Input/Proximity Detector")]
public class ProximityDetector : UnityEngine.MonoBehaviour, MixedReality.Toolkit.Input.IInteractionModeDetector
[<UnityEngine.AddComponentMenu("MRTK/Input/Proximity Detector")>]
type ProximityDetector = class
    inherit MonoBehaviour
    interface IInteractionModeDetector
Public Class ProximityDetector
Inherits MonoBehaviour
Implements IInteractionModeDetector
Inheritance
UnityEngine.MonoBehaviour
ProximityDetector
Derived
Attributes
UnityEngine.AddComponentMenuAttribute
Implements

Constructors

Name Description
ProximityDetector()

Properties

Name Description
DetectedColliders

A collection of colliders currently detected by this proximity detector. Only colliders associated with IXRInteractables are included.

InteractionManager

The interaction manager to use to query interactors and their registration events. Currently protected internal, may be exposed in a future update.

ModeOnDetection

The interaction mode to be toggled if when the detector detects the appropriate game state

Methods

Name Description
GetControllers()

Get a list of the UnityEngine.GameObject instances which represent the controllers that this interaction mode detector has jurisdiction over.

IsModeDetected()

Determine whether the detector has detected the appropriate conditions.

Applies to