Falling too fast.

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
toaster
Posts: 14
Joined: Sat Mar 21, 2015 3:44 pm

Falling too fast.

Post by toaster »

When I jump gravity seems to be fine, however when I fall of of an edge I almost warp down to the physics body below. Is this by design or am I seeing some sort of weird issue? I tried playing with the TimeStepDuration and set it to something slower to see if it still warps and it does. I'm not sure if it's trying to slide down the side of the wall and just instantly falling, but here are the settings I am using for my character controller:

Code: Select all

            Character = new CharacterController();
            Character.BodyRadius = .35f;
            Character.Body.Height = 1.0f;
            Character.JumpSpeed = JumpSpeed;
            Character.AirSpeed = 2;
            Character.SlidingJumpSpeed = 4;
It's not really anything weird, and the level is made out of static meshes which don't have any changed physics properties.

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

Re: Falling too fast.

Post by Norbo »

If the distance of the 'warp' is only around 1 unit (the default CharacterController.StepManager.MaximumStepHeight), it's probably the character's downstepping feature. FPS games often have characters nonphysically flying down stairs at 50 miles per hour, requiring teleportation to keep the character grounded.

You can disable downstepping by commenting out the TryToStepDown part of this if statement in the CharacterController:
if (StepManager.TryToStepDown(out newPosition) ||
StepManager.TryToStepUp(out newPosition))
{
supportData = TeleportToPosition(newPosition, dt);
}
toaster
Posts: 14
Joined: Sat Mar 21, 2015 3:44 pm

Re: Falling too fast.

Post by toaster »

I changed that value and it works. Thanks for the help! :)
Post Reply