Issue with Kinematic character passing through Static objects and collision debugging

Hello,
I’m working on a Defold project and having an issue with collision detection. My character is set as Kinematic, and static objects (like a stone) are set as Static. However, my character keeps passing through the stone instead of being blocked by it.

Here are the details:

The character’s collisionobject is set to Kinematic, and the stone’s collisionobject is set to Static.

Collision groups and masks:

The character’s group is player, and its mask includes stone.

The stone’s group is stone, and its mask includes player.

In the debug mode (Ctrl+D), the stone shows as green (should it be gray if it’s Static?).

When the character walks, its collision box turns purple, and when it stands still, it turns yellow.

Additionally:

When I enable debug mode, the character’s collision box overlaps with the stone, but the character doesn’t stop moving—it just passes through.

I’ve written code to detect collision messages, and the character does recognize collisions (e.g., the debug print triggers, and the color changes).

I’ve also tried cleaning and rebuilding the project (Project > Build and Clean), but the issue persists.

Questions:

  1. Could the stone’s collisionobject still be treated as a Trigger, even though its Type is set to Static?

  2. Is there a reason the stone is green in debug mode if it’s Static?

  3. Are there additional settings I need to check for Kinematic vs Static collisions?

Thank you for any advice or insights!

Have you also written code to resolve collisions? Kinematic and static objects will send collision response message, but the collisions will not be resolved. This is up to you as a developer to solve.

1 Like

Hi, I just wanted to thank you for the materials you shared! I integrated the code you provided, and now everything works perfectly. I couldn’t have figured it out without your help. Thanks again for taking the time to assist me!:slightly_smiling_face: