KinematicCollision3D.GetCollisionCount() returns always 1

Godot Version

4.2

Question

Hi,

i was wondering when does KinematicCollision3D.GetCollisionCount() return more than 1?

For testing, i made 16 StaticBody3Ds and let MoveAndCollided() fall a CharacterBody3D onto them. The result was 1 single collision.

I tested it with:

  • 16 StaticBody3D EACH having a CollisionShape3D with BoxShape3D
  • 1 StaticBody3D having 16 CollisionShape3D with BoxShape3D
  • 1 StaticBody3D having 16 StaticBody3D EACH having a CollisionShape3D with BoxShape3D
        KinematicCollision3D bel = MoveAndCollide(Velocity*0.1f);

        if (bel != null)
        {
            int i = bel.GetCollisionCount();
            C.Log(i.ToString());
        }

Not a single time did i get a CollisionCount greater than 1.
So i moved the falling players CharacterBody3D into the 16 boxes, again with the result of 1 single Collision. See Picture:

grafik
(The blue boxes are 16 StaticBody3Ds, the light white line is the players CollisionShape3D with BoxShape3D)

What am i missing here?

EDIT: nvm, i just recalled that i am using Godot Jolt instead of Godot Physics. Im not sure this has a place here then.

1 Like