Unity to Determine what is over the object?

In General I have a problem. In my game there is an object named Finish. And here he is waiting for a player that's just like the Finish to understand that the player stepped on it?
April 7th 20 at 11:07
2 answers
April 7th 20 at 11:09
If the simple plan of realization came into his area... the finish line should be a Collider, wishes him a script with OnCollisionEnter method if it is for 3D,2D in the same way, however it's in the unity documentation.

If you need to go through the finish line, but it worked for the script. Put in the component of the Collider and tick IsTrigger same work, but with the method OnTriggerEnter

If you just need to check from above whether the player than the finish, then take the point of surface finish and even the odds with the position of the feet of the player, for this player you can add the game object to the area of the legs.

But I can guess that you just need to know the contact, but okay,let it be.
And Yes, there is method Physics.OverlapSphere for 3D,for 2D OverlapCircle, put it on the object at his feet. This method you can assign a radius, and other settings. Then just iterate, if you have a Collider tag to, say, Finish, the actions to be performed - paris66 commented on April 7th 20 at 11:12
Thank you very much - Juvenal.Monahan commented on April 7th 20 at 11:15
April 7th 20 at 11:11
The easiest option colliders
Colliders, rakasta.
Well, or purely mathematical methods is also quite valid. - Michael commented on April 7th 20 at 11:14

Find more questions by tags C#Unity Game Engine