HI all! I’m trying to make a platform game for a project of mine and it was going great until I ran into a problem with my player model. The problem is that it keeps falling through my platforms and I don’t know why. The masks seem fine as well as this the collision shape for the platform seems to be find as well so I’m out of ideas as to why its not working. Any help would be greatly appreciated.
make sure your collision object types are set correctly: static for the platform, and dynamic for the player
see if you recvive collision messages, if not, that means the objects don’t see eachother (masks/groups are different)
Thank you for responding, however my masks seem to be fine (I might not be understanding what you mean) as well as for the platform types. This is what i have done.
Are you resizing the game objects containing the collision objects? I believe they only get scaled properly if you scale them uniformly. Make sure the Z scale is changed by the same amount.
Try enabling physics debug from game.project (physics section) to see what’s going on.
Yes, your masks seem to be good.
I see you’re using tilemaps for your platforms, so it will be little bit different than usual.
Check this out: https://defold.com/manuals/physics/#tilemap-collision-shapes
Aren’t you using older version of Defold?
Collision objects shloud have “Collision Shape” property, but I don’t see that in your screenshot.
Thank you for all the responses, I do have the collision shape sorry if that caused confusion i just had them collapsed.
for the player?
You will need this property for your platforms.
But all collision objects shloud have this property.
Can I ask you to tell me what version of Defold you’re using?
You can find it in Help > About
1.2.166
Ok, so it’s up to date.
I don’t know what the problem is, sorry.
Someone more experienced, like @britzl, will hopefully help you
You need to add some shapes to your collision object. You can also enable physics debugging in game.project (https://defold.com/manuals/project-settings/#debug).
to the platforms?
…to any collision object, you need to add at least one shape.
I was merely referring to the previous comments, reiterating that each collision object needs at least one shape. Either from the tile source, or manually adding collision shapes by right clicking on the collision object and choosing Add Shape.
Make sure you have the collsion shape set up properly in the tile source. Have a look here. I remember having a little trouble figuring it out when I was trying it for the first time.
Please make sure that the player collision object has at least one shape. The level can get it’s shape from the tilemap.
If it still doesn’t work then enable physics debugging:
Thanks for all the responses will try these when I get back to my computer