- Home /
Why my projectile is passing through the tilemap? How can I solve this easily?
I created some ball that when collides with any collider it will get Destroy, it is working in other object except for the Tilemap. Why is it?
Does the ball have a rigibody? Is it set to continuos collision detection?
Yes it has rigidbody and set to continuous collision detection but has a constant velocity in update method.
Answer by highpockets · Apr 09, 2019 at 12:14 PM
You should deal with physics inside the physics loop. Try taking any physics related code out of update and put it in FixedUpdate()
I assume that was the reason, so I’ll make my comment an answer
I tried it but projectile still passes through the tilemap
Answer by jrodaz66 · Apr 13, 2019 at 10:17 AM
It seems that it passes through because my projectile is kinematic, I just changed it to dynamic and set the gravity 0 and now it works