This project has moved. For the latest updates, please go here.

Vertical friction

Topics: Developer Forum
Feb 26, 2008 at 6:53 PM
Is it possible to set vertical friction to a value different from horizontal friction? I ask because the project I'm working on requires a character to be able to grab onto a wall in preparation for jumping onto another wall, or a higher ledge (kind of like ninja wall jumping, only with the ability to cling and assess the surroundings).
Feb 27, 2008 at 4:32 PM
Usually, physics engines are ment to simulate actual physics. ^_^ Even if you make him slide down the wall slowly, the character will most likely bounce off of it. If you want it to really cling to the wall, I'd reccomend pinning his hand and foot to it. If you want him to slide down the wall, you could move the joints/springs downward at a gradually increasing rate. Just be sure to break them once he hits the ground or detaches from the wall.
Feb 28, 2008 at 5:07 AM
Edited Feb 28, 2008 at 5:07 AM
So the best way would be to cling to any surface (including the floor) until a perpendicular tension is applied (so hanging upside down would always have the tension due to gravity)?

Or would it be easier to create an invisible body along each wall that I want the character to be able to grab?

Either way... How would I achieve this?
Feb 28, 2008 at 4:15 PM
Controllers with 'Fixed' in the name (like FixedLinearSpring) take a world coordinate for the second anchor, so you wouldn't need to have an invisible Body there. If there is such a thing, you'd probably want to use a FixedRevoluteJoint. (Been so long that I can't remember. I need to start working on my game again...)

Remember what I said about the character bouncing (or pushing in the case of a ragdoll) off the wall, so make sure to ignore the tension there.