No collisions between sprite and level (SOLVED)

Hello,

I’ve made a very simple project, with a sprite and just a platform.
I think i have do all the needed operations, but the collisions are not working.

  • for the level: static collision, with the tilemap used as collision mask (group: level , mask: player)
  • for the player: dynamic collision, with a box as collision mask (group: player , mask: level)

The player is acting like a ghost, and is passing through the platform without colliding.

I’ve made comparisons with available working samples, and i don’t see what i’ve forgotten.

If you want, you can download the project here (400 Kb)

Thank you for reading :slight_smile:

You haven’t actually set up the collision for the tile source. Read this.

  1. Open your level.tilesource, edit the “Collision” field at the bottom of its properties and select the image you used for the tilesource.
  2. Add a collision group to the tile source named “level”, or rename the default one.
  3. "To set a tile physics shape to a specific collision group, select the group and click the tile. To remove a tile shape from its collision group, select the “Tile source” root and click the tile. " (From the manual)
3 Likes

Thank you !

It was not clear at all for me, indeed.

My biggest mistake was i’ve made the wrong assumption that i could give whatever name to the group of the tilemap’s collision object.
Now i have understood that i must use the id of the collision group set in the Tile Source.

Thank you again, i’ve spent quite a few hours on this one :slight_smile: