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:
-
Could the stone’s collisionobject still be treated as a Trigger, even though its Type is set to Static?
-
Is there a reason the stone is green in debug mode if it’s Static?
-
Are there additional settings I need to check for Kinematic vs Static collisions?
Thank you for any advice or insights!