- Home /
About in air control
I am confused with the logic concerning in air /(!grounded) rules. Why does the editor stop allowing you to control a player when you're not grounded? I understand the need for realism (normally when falling you can't propell yourself forward or backward), but I feel that that is something I should be able to chose to not allow by script...
Anyway, how do I allow in air movement? I saw the script on the wiki site but I don't understand it. How do I simply
'continue to propel the player normally when (!grounded)' ??
Isn't there simply someway to allow transform.forward/ controller.SimpleMove.forward when in the air?
The general movement script I am working with is
var controller : CharacterController = GetComponent(CharacterController);
var forward = transform.TransformDirection(Vector3.forward);
var curSpeed = speed * Input.GetAxis ("Vertical");
transform.Rotate(0, Input.GetAxis ("Horizontal") * rotateSpeed, 8);
controller.SimpleMove(forward * curSpeed);
I am working with a character controller. Thanks for any help.
Your answer
Follow this Question
Related Questions
How to make camera position relative to a specific target. 1 Answer
Disable movement control during jump 3 Answers
Trying to get accelerated jump speed. 2 Answers
In air direction control 4 Answers
In air movement troubles. 1 Answer