Camera Question

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
chronicacid
Posts: 12
Joined: Sat Jul 10, 2010 5:19 pm

Camera Question

Post by chronicacid »

why does

simplecharacterinput.cs use
Camera.Position = CharacterController.Body.BufferedStates.InterpolatedStates.Position + CameraOffset;

and charactercontrollerinput.cs

Camera.Position = CharacterController.Body.Position + CameraOffset;
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Camera Question

Post by Norbo »

Using the interpolated position allows for smoother movement when using internal timesteps. With internal timestepping, the engine may go forward two steps in one frame and zero the next depending on how much game time passes. If the direct, non-interpolated position is used, the movement won't be as smooth as it could be.

There's no reason behind why the Simple character controller does that and the CharacterController does not; it's just an oversight.
Post Reply