Collision with scaling and Z-value (SOLVED)

I am having a problem in applying collision. I have created a tile source and created a ground collision group named “ground”. I have selected my target tiles to add collision to. Below is snapshot:

Also, i have created the same for the tile map. Below is a snapshot:

When created my tile map, i have added a background layer, and another layer. I have given the background layer a z-value of 0 and the later a z-value of 1. As a result, in order for my character to appear, i have added a z-value of 1 to the game object “Player” which contains the spirit. Also, i have added a scale of (2,2,2) as per your recommendation on one of your posts. Below is a snapshot:

The final result is this:

As you can see that the collision is not working. on the on_message event, i used the function print() but it doesn’t reach there. If you can please help me solve this issue…

I can’t believe what i missed. Everything i done was correct. The only thing i missed was the groups and the masks. By default, all collision objects have the value "default. When i saw that, i told my self, they all have the same group-mask, so it should be Ok. While i was searching, i just stumbled across someone who changes them, so i tried changing them and everything worked.

Sorry for posting a question and then answering it myself. Honestly, i tried to delete it, but didn’t how :slight_smile:

5 Likes

This is really easy to miss so I think it’s good the post is here.

2 Likes