Answer the question
In order to leave comments, you need to log in
Unity Determine what is above an object?
Hello everyone
, I have the same problem. I have an object in the game named Finish. And now he is waiting for the player, but how can the Finish understand that the player has stepped on him?
Answer the question
In order to leave comments, you need to log in
If in terms of a simple implementation - I entered its zone ... The finish line should have a collider, hang a script on it with the OnCollisionEnter method if it is for 3d, for 2d it is the same, however, this is in the unity documentation.
If it is necessary to pass through the finish line, but at the same time the script would work. Check the IsTrigger checkbox in the collider component and work the same way, but with the OnTriggerEnter
method to the leg area.
But I can guess that you just need to find out the contact, but okay, let it be.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question