Character Controller

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
Piers
Posts: 8
Joined: Tue Sep 16, 2008 9:53 pm

Character Controller

Post by Piers »

Alright... seems sort of silly, but I honestly don't know how to use the character controller at all. Looking through the example did not really help and when trying to use it in my own code, it just stands there. All I've been doing is adding the controller to the space which works fine but I can't get it moving or being effected by gravity.

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

Re: Character Controller

Post by Norbo »

It sounds like the body of the character does not actually belong to the space, and so its position is never updated, nor is gravity applied.

You might have noticed in that demos that the Input class deactivates the controller at the beginning, and later activates it on user input. If you just construct it, the character's entity body will not belong to a space. Try stepping through the CharacterControllerInput constructor with the debugger to see how it initializes things.

This is a bit of an oddity, hidden by the way the CharacterControllerInput deactivates and then reactivates the character later.
Post Reply