Answer the question
In order to leave comments, you need to log in
How to make jump force equal in unity?
By clicking the mouse, the object bounces, the number of jumps is not limited, that is, jumps can be made in the air. If you use addforce, then with each subsequent jump, the force increases many times over and the object simply flies into "space". How to make all jumps the same?
Answer the question
In order to leave comments, you need to log in
docs.unity3d.com/ScriptReference/Rigidbody.AddForc...
There is a parameter - the type of force applied, as I understand it, you need docs.unity3d.com/ScriptReference/ForceMode.Impulse.html
Impulse. single use of force. kinda kick in the ass)
GetComponent<Rigidbody>().velocity += new Vector(0, jumpPower); // зависит от оси, по которой прыгаем
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question