J
J
JoJikRe2021-03-27 15:17:14
C++ / C#
JoJikRe, 2021-03-27 15:17:14

How to make OnCollisionEnter2D work multiple times?

I have a character and if he touches a certain zone, then a certain object appears, and if he does not touch,
then the object becomes invisible, but there is a problem when I enter a certain zone, the object appears, but when I leave the zone, the object does not become invisible, how to solve?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
pashara, 2021-03-27
@pashara

Then you need to work out the exit from the zone. OnCollisionExit read.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question