Page 1 of 1

Avoid player blocking againt wall when is jumping

Posted: Sat Nov 26, 2011 7:06 pm
by saturn1
Hello i use your method findSupport to determine if the player can jump.

But when a player jump he can block against a wall when the player press Left or Right direction.

Have you idea to fix this?

Thank you.

Re: Avoid player blocking againt wall when is jumping

Posted: Sat Nov 26, 2011 7:40 pm
by Norbo
Are you using the CharacterController, the SimpleCharacterController, or a custom implementation?

If it's just a friction issue, you can remove the friction using something like the CharacterController's RemoveFriction event handler.

Re: Avoid player blocking againt wall when is jumping

Posted: Sat Nov 26, 2011 8:44 pm
by saturn1
Thank you it works!!

Re: Avoid player blocking againt wall when is jumping

Posted: Fri Jan 13, 2012 3:56 pm
by saturn1
UP :P.

It works but when i remove friction after that my character slip a little.

There is a way to avoid that?

Thank you.

Re: Avoid player blocking againt wall when is jumping

Posted: Fri Jan 13, 2012 4:01 pm
by Norbo
Horizontal motion should be handled by a custom constraint (CharacterController, SphereCharacterController) or directly (SimpleCharacterController). The fact that the body has no friction with the environment should not cause it to slide along the ground unless the horizontal motion control allows it. Do you mean a different kind of slipping?

Re: Avoid player blocking againt wall when is jumping

Posted: Fri Jan 13, 2012 4:04 pm
by saturn1
Before i used LinearDamping and LinearFriction ( i guess it's a variable which decrement velocity each update) but now with RemoveFriction, if i move my character it slide a little bit on ground.

Re: Avoid player blocking againt wall when is jumping

Posted: Fri Jan 13, 2012 4:08 pm
by Norbo
It would probably be good idea just to use the CharacterController or SphereCharacterController. That way, you don't have to try and implement what they do already. The CharacterController is full featured and allows stepping, while the SphereCharacterController is a bit simpler and 'slides' over obstacles rather than stepping on top of them discontinuously.