- Home /
jump with character controller best way?
i was search for the best way to do jump with character controller and use my own Gravite first i used this one _velocity.y += Mathf.Sqrt(JumpHeight * -2f * Gravity);
to jump and this _velocity.y += Gravity * Time.deltaTime;
to accept the gravity here is -9.81f and this way was the second`moveDirection.y = Mathf.Sqrt(-2.0f Physics.gravity.y jumpSpeed);` and to apply Gravity moveDirection.y -= gravity * Time.deltaTime;
and here public float jumpSpeed = 8.0F; public float gravity = 20.0F;
so what you think is there another way to do jump or better wich is the best
Answer by hugodeheld · Mar 06, 2018 at 09:54 AM
I recomend using a rigidbody2d and simply adding velocity upwards. otherwise if you upload your script people can have a look at it.
Your answer
Follow this Question
Related Questions
,How to disable autojumping when holding spacebar? 4 Answers
Shift BHOP in Character Controller 0 Answers
can anyone help me to smooth the jump? 0 Answers
How do I make this jump function work? 1 Answer
Not able to jump 1 Answer