Collisions get bumpy when rigid body interacts with spawned static body collision shaps

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By dzeroone
:warning: Old Version Published before Godot 3 was released.

I have

  • Player(RIgidBody with rectangle collision shape)
  • Ground Spawner( this is for spawning ground one after another )

Here ground is a StaticBody2D with a rectangle collision shape

When I apply set_linear_force toward X-axis to the Player, Player moves forward.
It’s alright. But, sometime Player gets hit by the ground and Player flies away.

I have tried different collision shapes like CapsuleShape2D, CollisionPlolygone2D none is solving the problem!

What should I do?

:bust_in_silhouette: Reply From: eons

If the ground pieces appears always on the same place, you can add them all and just turn visibility and shapes trigger mode.

Try with a kinematic body too instead of static, it may be more spawn friendly.