Character height bug
Posted: Sun Apr 29, 2012 1:04 pm
Hi again,
I'm experiencing a very strange bug with the character height. As soon as the game starts, the character is at certain height, say 100%.
But as soon as he does his first crouch, his standing height is now about 60% of the original.
This is the code that I use to create the character:
Do you have any clue why it's happening?
Thanks
I'm experiencing a very strange bug with the character height. As soon as the game starts, the character is at certain height, say 100%.
But as soon as he does his first crouch, his standing height is now about 60% of the original.
This is the code that I use to create the character:
Code: Select all
cci = new CharacterControllerInput(space, ((Game1)Game).camera);
cci.CharacterController.Body.Radius *= 0.8f;
cci.CharacterController.HorizontalMotionConstraint.Speed = 70;
cci.CharacterController.HorizontalMotionConstraint.CrouchingSpeed = 20;
cci.CharacterController.StanceManager.CrouchingHeight = 20f;
cci.CharacterController.StanceManager.StandingHeight = 41;
cci.StandingCameraOffset = 14;
cci.CrouchingCameraOffset = 10;
cci.UseCameraSmoothing = true;
cci.CharacterController.HorizontalMotionConstraint.MaximumForce = 4000;
cci.CharacterController.StepManager.MaximumStepHeight = 20;
cci.Activate();
Do you have any clue why it's happening?
Thanks