Fix a few of the issues that spawned off of the physics engine, such as:
Player being able to stick to walls
Player trying to jump over a ground block and getting stuck on the corner of it
Player pressing the jump key and going way higher than they are meant to
Not physics related but “Point inside object” not being great for an enemy object detecting if there is a wall or pit in front of it, if there is more than one of the same enemy
What is the actual result
I’ve tried a couple of things, but every fix I implement or try to either doesn’t work or causes a worse issue
Related screenshots
Here is a game link in case you want to go in and find the bugs yourself
Tried to the wall stick with the inverse collision, but that doesn’t work well, plus it makes the Player’s hitbox bigger to get it to work which is annoying for everything else
What shape is your collider? If it’s a box, perfectly flat colliders result in infinite contact which makes friction stick you to walls. Try editing it to be slightly angled.
According to the descriptions, maybe you should use an impulse for the jump. But, the condition about the “Jump” point is hard to understand so I don’t know. What is sure is that you should replace this condition by something else.
I don’t know about your player sticking to walls. I have a physics-based character too and mine works fine. As for your player getting stuck on ledges, that’s a byproduct of getting stuck to walls. Fix that and you fix everything.
Did you ever set the friction to 0? That’s what I have. I remove all friction and I just increase the linear damping when the player is on the ground. I think I have 0.1 linear damping in the air and 4 on the ground.
I did try that, But it has the drawback of the player not stopping when walking on the ground
I found a different solution, however.
Instead of having the game check if a point is not in an object (Because that’s buggy and doesn’t work) I have it check if a point is in an object, and then apply a force equal and opposite to the player’s movement speed