Hi everyone, i'm currently trying to make a character controller for a mobile game i'm developing, but i'm stuck figuring out how to make a smooth jump instead of the linear i have now, i need a smooth jump, just like the basic character controller from unity does. This is what i have: I have a button, to make the controller jump. This is the script snipped out Code (CSharp): private CharacterController player; public float jumpSpeed=5f; public float gravity=8f; void Start() { player = GetComponent<CharacterController> (); } void Update() { if (jumpButton.IsPressed()) { if(player.isGrounded) player.Move(new Vector3(0.0f,jumpSpeed*Time.deltaTime,0.0f)); } } if(!player.isGrounded) player.Move(new Vector3(0.0f,gravity*Time.deltaTime,0.0f)); } How do you make a smooth, accelerated jump? Thanks in advance
I tried to use a rigidbody with gravity as well, but it goes through terrain.. and if i put a capsule collider it is just glitchy with CharacterController.Move .... i can't get it to work.. do you know how to do that?