In 3 simple steps, deploy presence detection in Unity

The exercise here demonstrates using the trigger method to alert a game object about detection.

  1. Create an 3d child game object on the game object that shall have the detection mechanism. Disable the mesh renderer on it and enable the IsTrigger option.
Unity
Unity

2. Add the rigidbody component on this game object and disable gravity on it.

Unity

3. Add a script on this object with the trigger method. Choose the action as per preference.

Unity

That should be it :)

Here is the final result.

Thank you very much

--

--

--

Work in Progress.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Vagrant Provisioning with Docker

GraphQL: What is it and why you should consider it over REST?

AWS vs Azure: Which Cloud Platform Should You Choose in 2022?

Five Flutter Widgets

Brighter Future

Importing data from a PostgreSQL database to a Pandas DataFrame

MongoDB context implementation in C# as neat as Entity Framework

How to Avoid Being A Burnt-Out Software Engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Samarth Dhroov

Samarth Dhroov

Work in Progress.

More from Medium

Mapping input to a player object.

Different Lights in Unity.

Adding a Main Menu to our UI

Adding Shield Strength And Color Change When Damaged And Tying It To UI Sprite Sheet