Stuck on a problem.....literally


So here’s my problem:

I have a character who can walk and jump. I also have a wall. If the character jumps into the wall, he slides down as expected. But if the character jumps into the wall, and you hold down the walk key, force is applied to the character which is pushing it into the wall making it just stay there until you let go.

I have tried a few things to fix this and none have worked. So, does someone with more BGE knowledge than me have any idea on how to resolve this issue?

Thank you.

you could use a collision sensor, sensor object or ray to detect if the player touches the ground, and making it unable to move otherwise. This method will make you unable to move in mid-air, if you want this I guess you will have to do it the other way around and check for walls, or rather check for no walls in front of the player.


I tried what just said a while ago but it didn’t work. This was because of my own errors in my script and because of a ray sensor not firing every time. Between now and then I fixed those errors and now it works…sorta. But thank you anyways, that just confirmed my theory