[Solved] Platformer Problem?

Hello All,

I am having a little problem with Physics Mat 2D and am hoping someone with more wisdom than me can help.

I am making a little platformer project with a sprite running and jumping and all that jazz, anyway, when the player jumped it was getting stuck against the wall instead of up and over. No biggie, I thought I just make the wall of that sprite use a physics Mat 2D with a friction of zero. Yep that worked … than I tried walking on the top of that platform and the player sprite would NOT stop moving he kept on running and in some instances sliding backwards.

So what would be the best way to stop this sliding from happening? I just can’t see a good way around this?

To anyone who can help here is a big thankyou in advance!

Did you tried with two colliders ? The one with the friction for the platform and the second for the wall with zero friction. Or change the friction to zero by jumping.

Try using the Platform Effector 2D, instead of the physics material. Also, you probably want to child the player to the platform once he is on it and then deparent him once he moves off the platform.

2 Likes

What I did was what all the YouTube tutorials told me to do. Which was change the Material on the block that I was jumping to like this (I thought a piccy would describe it better than I could):

Which resulted in the player just continually sliding around on the top! Which I didn’t want to happen which make me wonder why the tutorials suggested doing it.

I’ve never heard of the Platform Effector 2D - I’ll have to dig into that. Thanks a lot for replying :sunglasses:.

EDIT: I tried using the Platform Effector 2D and it “seems” to be working just fine it allows me to jump to the platform and without a hint of sliding. So, I think that “might” have solved that problem!!!

Thankyou so much for replying :sunglasses::sunglasses::sunglasses:.