Hello! I’m an amateur in this but after spending hours and hours on tutorials and still unable to make any progress I decided to ask help here. I have made multiple character control scripts now and finally found the best fit for my game. However I can’t make the jump work. At the moment this is the jumping part in my script.
public int gravity = 20;
public float jumpForce = 20.0F;
private Vector3 moveDirection = Vector3.zero;
void Update()
{
if (controller.isGrounded) {
//Jumping
if (Input.GetKeyUp (KeyCode.Space))
moveDirection.y = jumpForce;
//transform.Translate ((Vector3.up * jumpForce) * gravity * Time.deltaTime, Space.World);
}
moveDirection.y -= gravity * Time.deltaTime;
controller.Move(moveDirection * Time.deltaTime);
}
With this the character jumps, but falls really slowly back to ground. Like it would be moon walking. I also included the old line(the orange one) which I used, but with that character jumped in blink of an eye and fell just as fast. So either of these aren’t working at the moment. I can work with either one, if I just get them to work somehow. I just want really “normal” game jump. Nothing fancy at all.