Platformer collision bugs

I am making a fp game and now that i got the layout done but when i play sometimes the platforme will bug out and make me not move
link PlayCanvas | HTML5 Game Engine

Hi @STEVEN_LINDNER!

This is probably because the raycast to detect if you are grounded doesn’t detect the collision component of the ground entity anymore. The collision component in combination with the settings of the rigidbody component of the player still keeps you on the edge of the platform.

Because of the raycast this.onGround is probably false and that’s why you can’t move.

Hi i am wandering how could i fix that i am very new to this kind of stuff. Not to sound needy but i need help. And i am wandering if you could give me some insturctions please.

I was also Wandering if you could please test the game out and if you find any bugs or like things that should not happen please let me know and i will see what i can do most likely not much lol i. Like i said i am very new and thank you for hellping me with my problems.

It’s a common problem.

Unfortunately, there is no simple solution without causing other problems. In my own projects I used multiple raycast to detect if the player is grounded. That’s basically a workaround for my request below.

Maybe you can create a trigger entity below the player entity instead of using a raycast, but I’m not sure if this will be stable.

How would i add multiple raycasts? Would i copy the code and paste it a couple of times but change some values or how. And if it is just copy paste what would i copy and what values should i change?

Even though it sounds simple, it is not easy to achieve without the necessary knowledge.

Setting the friction of the player’s rigidbody to zero seems to solve the problem of getting stuck on the edge without being able to move. The player will fall off the edge instead.

ok i will test that out thank you could you please look for any bugss or anything please
your friend
steven