I
I
iLoveGam3s2021-08-19 09:09:29
Unity
iLoveGam3s, 2021-08-19 09:09:29

How to limit the movement of a 2d object?

611df55a7012d627154607.pngI have a moving platform that should not go beyond the one behind it. How can I do this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
Hixac, 2021-08-19
@ILoveMakingGames

Use colliders, on collision the OnCollisionEnter2D method fires. Let's assume that during a collision, the speed becomes negative or zero towards this object.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question