Character controller sliding question

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
guerrila
Posts: 2
Joined: Fri Aug 08, 2014 4:57 pm

Character controller sliding question

Post by guerrila »

Hello, I would like to know if it's possible to modify the character controller to slide "faster" on walls, horizontally, even if the angle between the character direction and the wall is close to 90 degrees.

Thanks.
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Character controller sliding question

Post by Norbo »

This would be easiest to handle as a modification to the input to the character controller, as opposed to a modification to the character controller itself. For example, if the raw input would send the character into a wall, make the character's movement direction parallel to the wall instead.

The contacts in the CharacterController.SupportFinder.SideContacts could be useful. The contact normals could be used to modify the movement direction.

Ray casts are another option; the character could collect information about its surroundings before actually ramming into something. The movement direction could adapt smoothly. Depending on the environment, some cleverness would be required in determining the ray samples to avoid missing obstacles. Using both this approach and the contacts approach to fill in gaps might be a good idea.
guerrila
Posts: 2
Joined: Fri Aug 08, 2014 4:57 pm

Re: Character controller sliding question

Post by guerrila »

Thanks!
Post Reply