anyone know the Code for controlling jump height? It's something I'll need for the player controller. jump height as in the player can just hop if they press the jump button quickly or jump full height if they hold it down.
If your developing your own controller just make a variable that has a float value. If the person presses spacebar, increase the rigid body's velocity in the upward direction by your float value.
Or addforce.force I think adds more force the longer you hold the button down but that gets tricky to balance between a small hop on first press or flying off the screen if you hold it down to long
AddForce is much better for the addition of force constantly. In this case we can guess that the force wont be constant therefore it is better for rigidbody.velocity to be used!
I guess I should head over to some unity scripting tutorials because I don't know what I would write after "Public Float jumpHeight" to put it into effect.
going through the beginner scripting, still 0 idea what I need to type in the update to give the player control of how high they jump :/