Page 1 of 1

Falling too fast.

Posted: Wed Mar 25, 2015 5:10 pm
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

Re: Falling too fast.

Posted: Thu Mar 26, 2015 12:57 am
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);
}

Re: Falling too fast.

Posted: Fri Mar 27, 2015 1:13 am
by toaster
I changed that value and it works. Thanks for the help! :)