- Home /
Question by
riandika_ltd · Jun 19, 2020 at 06:51 PM ·
collider 2d
stop moving object with collider and stay at the last position.
how to stop a moving game objects, i moving the objects by add a add force, and i give collider to the object and the target. and i detect the collosion, when object and target get contact, i stop it use vector2. zero. its work but sometimes the object passes through the target. so that's the problem, anyone know how to fix it?
Comment
Answer by sabaz · Jun 19, 2020 at 10:14 PM
Probably your object is going too fast and sometimes happens that the object passes through another. Try to set the collision detection mode to Continuous. But be careful, it has a big impact on the performance due to more calculations. .