Added Physics to Tilemap Collision Mask objects

1 - I want the Physics behavior to work correctly with Tilemap Collision Mask objects.
2 - I am developing a platform game that features objects using the physics behavior. For optimization purposes, my environment is made with a Tilemap. However, I am unable to apply the Physics behavior to the Tilemap Collision Mask. The physics engine considers the entire map’s size rather than the collision of individual tiles.

When I add Physics to the Tilemap Collision Mask, the objects remain around the object and do not interact with the requested Collision Mask.

2024-06-20 09-15-22 (1)

mmm…i don’t think it is doable since the physics behaviour consider your tilemap as a single object…thaz why it falls entirely down…also physics collisions arent compatible with platforms collisions…they have their own collisions system
i may be wrong tough.

I only tested the platformer behaviour and it works as long as u declare correctly the collision tiles with Tiled…
but for the physics one i don’t think it gonna works…for individual tileset

1 Like

Yes, that’s the problem I’m having. In order to create a scenario with some physics objects, I need to create several objects in my scene with static physics behavior to replace the collision with tilemap. However, I’m working on a much more elaborate game and I need a considerable optimization. A feature that could make this collision with the scenario using physics would be ideal. A single object in the scene for the entire scenario.

I am unsure whether this would be possible, at least not with the existing objects.

The physics system uses completely different physics-only collision masks, separate than what exists on any object (not just the tilemap mask).

I believe this is provided by the physics engine, Box2D, so it doesn’t even see what the object is, just your box2D (Physics) configuration.

1 Like

The solution would likely be to create a specific behavior for the Tilemap Collision Mask that performs a “conversion or check” of the tile collision, making it compatible with the physics behavior.