S
S
Shameless192020-11-01 13:32:34
Unity
Shameless19, 2020-11-01 13:32:34

How to check if objects are in contact?

Whether I check whether there was a collision of objects through OnTriggerEnter2D,
How to check whether the object flew further after the collision, or continues to touch?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DanielMcRon, 2020-11-01
@Shameless19

It is not clear how you check because there is no code. Did you mean trigger? OnTriggerEnter2D, this is when entering the trigger collider.
OnCollisionEnter2D, this is when colliders collide.
How to understand further to touch depends on your case, but instead of Enter there will be a prefix Stay. And if it touches, then set the boolean variable to true

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question