One (rigid) object dives into another - collision is not working properly

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By laurentio.verde


I’m new with Godot.

I’ve a problem with collision system.
My tank is rigidbody2d with rigid mode, and also walls are rigidbody2d, but in static mode. I’ve encountered same issues when walls were staticbody2d.

Sometimes one collision object dives in another.
Here is video of the problem - the problem is visible in the half of the video i think:

I’ve tried:

  • Add more physics engine FPS
  • Change logic behind tank
  • Changed collision types of walls
:bust_in_silhouette: Reply From: laurentio.verde

Ok, i found bug in my code. I’ve used apply central impulse for my RigidBody2D, which is ok, but then I’ve used rotation property for rotation, which shouldn’t be used in RigidBody2D (use set angular velocity instead) - that created this bug.