Air controls for 3rd Person

Hi, I really could use some help with this.

I’m using unity’s third person controller for my flying character, and I already changed it so when pressing jump, it flies up:

if (Input.GetKey (KeyCode.Space))
	{
		lastJumpButtonTime = Time.time;
	}

Thing is, when its in the air, I cant control it the say way as if it was on the ground. It just keeps going in the directing and speed with which it left the ground.

Any Ideas what I need to change in the code? :face_with_spiral_eyes:

forgot to add - to make it fly I had to delete/comment lines 237- if (IsGrounded()) { and 245- }

Wouldn’t it be an idea to code a separate bit of code to change the gravity and controls because currently you are just infitate jump,

http://www.scottpetrovic.com/blog/2010/11/unity3d-game-progress-flying-controls/

found this :slight_smile: