Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »



Overview

A ProximitySensor is a component that can detect objects in a specified detection field. At least one trigger collider needs to be assigned to function as the detection field for the ProximitySensor.

A Trigger Collider does not have to be on the same GameObject as the ProximitySensor.


Where to find

The Proximity Sensor can be found under Standard Components >Proximity Sensor > Add Physical component.

This will add the Proximity Sensor component to the currently selected object or create a new empty GameObject with the component attached if no objects are selected.

The following inspector component will be shown:


Feature layout

The images below show the complete feature layout of the Proximity Sensor component.

Live Data

 

State

Shows whether the sensor is currently active.

Output Signal

Low when no object is detected. High when at least one object is detected.

Detected Objects (n)

The number of objects detected within all the Triggers.

Properties

 

On Signal High()

Actions executed when Output Signal is set to high.

On Signal Low()

Actions executed when Output Signal is set to low.

Triggers (n)

The detection field of the Proximity Sensor.

Generate Rigidbodies

When checked creates Rigidbodies on the trigger objects when you enter play mode.

Control Panel

 

Generate Control Panel for SlideSwitch

Creates a Control Panel Interfacefor the Proximity Sensor.


How to use

  1. Create the Colliders to use as the Proximity Sensor’s detection space and set them to be triggers.

2. Add the trigger colliders as Triggers.

3. Add an action to the Proximity Sensor.

4. Test if the actions are activated in runtime.

  • No labels