M
M
Mark Nikitin2017-10-26 23:06:44
Unity
Mark Nikitin, 2017-10-26 23:06:44

How to find out if objects intersect?

How to find out that objects intersect. For example, I have 2 objects and they move, how to find out that objects have begun to intersect.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Denis Gaydak, 2017-10-27
@goblinek

If everything is not bad with English. then read this
https://docs.unity3d.com/Manual/CollidersOverview.html
especially important to you there will be signs "what intersects with what"
And so, moving objects should have some sort of colliders.
then in the script you can use
https://docs.unity3d.com/ScriptReference/Collider....
and similar OnCollisionExit , OnCollisionStay
or use triggers if you just find out about the intersection, ala "touched each other"
with collisions there inside there will be more information, for example, intersection points and the like.
https://docs.unity3d.com/ScriptReference/Collision.html

G
Griboks, 2017-10-26
@Griboks

colliders/triggers

T
tapokshot, 2017-10-26
@tapokshot

Look here
https://habrahabr.ru/post/141362/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question