Hey guys,
I've been learning Unity 3D, slowly. I'm trying to make a maze, and need an event to occur when they reach the finish area.
How do I fetch object location and check if it's in the target area? Using Javascript.
Thanks for any help!
Hey guys,
I've been learning Unity 3D, slowly. I'm trying to make a maze, and need an event to occur when they reach the finish area.
How do I fetch object location and check if it's in the target area? Using Javascript.
Thanks for any help!
If your end area can be treated as a box, you could add a BoxCollider to your scene around the finish area and set its isTrigger
property to true. Then you'll get a callback to OnTriggerEnter
on your entity when it enters the area, which you can subsequently use to end the level or whatever.