G
G
Gregory2562021-09-14 19:29:13
C++ / C#
Gregory256, 2021-09-14 19:29:13

How to delete an object when another object reaches a certain coordinate?

How to remove an object with a condition if another object is above it? Declaring a new variable is not an option.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
emilsafin, 2021-09-20
@Gregory256

The easiest way is to use an additional collider for the object you want to collide with. (Don't forget to check the Is Trigger box). And in the player code use OnTriggerEnter(2D)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question