CharacterController: Modifying surface friction

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
mcmonkey
Posts: 92
Joined: Fri Apr 17, 2015 11:42 pm

CharacterController: Modifying surface friction

Post by mcmonkey »

How would I go about editing the CharacterController's friction level, to make it slide around in certain situations?
I want to make wet surfaces that you can slip on, and/or force the player to slip on all objects due to changes in the character object.

Changing CharacterController.Body.Material.<x>Friction does not seem to change anything (except, I suppose, objects on top of the character body)

I'm working in v1.4.0
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: CharacterController: Modifying surface friction

Post by Norbo »

The character ignores friction entirely (it attaches a callback in the CharacterController constructor to zero out all material properties), so it would require modifying the character's TractionForce or other character properties. Information about the character's current support can be found through the CharacterController.SupportFinder.SupportData.SupportObject property.
Post Reply