- Home /
Making collision boxes objects can go through
I want to make something similar to an invisible field where something can go through it however it would be detected so that my script could activate. How do I go about this?
on your colliders, check the trigger box. then detect in your script with OnTriggerEnter(){ // do stuff }
alternatively if your area is a box shape you can check if x an y coordinates are greater than/ less than the boundarys.
of course if it's a circle shaped area you can simply check distance from the center!!!!
Answer by Dreadnought404 · Aug 13, 2017 at 12:18 AM
All you have to do is open up the object's info in the inspector and set it as a trigger by clicking the checkbox that says 'Is Trigger'. This will make any object be able to go through it, while still having it detect collisions.