Hi,
I’m creating a 2.5D Platformer to finish my character controller which uses a rigidbody because most of the obstacles work adding force to the player.
I solved all the movement part in this post (http://forum.unity3d.com/threads/help-with-my-character-controller.429769/#post-2778885) and created a bool to checks if the player is grounded watching some tutorials.
The problem is that now that I tried to make the character jump with this code:
public float jumpForce;
void Start ()
{
myRb = GetComponent <Rigidbody>();
void Fixed Update ()
{
if (Input.GetButtonDown ("Jump"))
{
Jump ();
}
}
void Jump ()
{
if (isGrounded)
{
myRb.AddForce (Vector3.up * jumpForce);
}
}
And when I press the button the player moves up extremely fast. Scaling the value just makes the player jump less high (which I don’t want, since I need the player to be able to jump 2 units).
Is there any way to make the player jump to that height less quick?
PD: There is some drag value to the rigidbody, so that it stops when i stop pressing A or D.
Thanks, I lowered the gravity and played a little bit with the drag and now it works fine =D.
– JaMG