Update

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
Stevemata
Posts: 33
Joined: Sat Mar 17, 2012 11:11 pm

Update

Post by Stevemata »

I'm using the character controller, and under my current configuration it's definitely not frame rate independent. Was is the proper update procedure and configuration for a frame rate independent character controller?

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

Re: Update

Post by Norbo »

What kind of framerate dependency do you see? Is it just camera interpolation issues? If so, pass in the elapsed game time to the CharacterControllerInput.Update rather than the Space.TimeStepSettings.TimeStepDuration. The latter only works when one time step is taken per frame. When using Space.Update(dt), zero or multiple time steps could occur in one frame.

The CharacterController itself updates within the context of the physics engine, so if the physics are frame rate independent, the character is too. (There was a bug in v1.1.0 where an extremely small Space.TimeStepSettings.TimeStepDuration would result in 'ramp-launching' behavior, though; that is fixed in v1.2.0.)
Stevemata
Posts: 33
Joined: Sat Mar 17, 2012 11:11 pm

Re: Update

Post by Stevemata »

all corrected, I was using space.Update() rather than space.Update(dt)
Post Reply