private void Update() { if (Input.GetButtonDown("Jump") && _characterController.isGrounded) { _objectMover.Jump(15); } }
private void Update() { var inputVector = new Vector3(Input.GetAxisRaw("Horizontal"), 0, Input.GetAxisRaw("Vertical")); var normalizedInputVector = inputVector.normalized; _objectMover.MoveHorizontal(normalizedInputVector * moveSpeed); if (Input.GetButtonDown("Jump") && _characterController.isGrounded) { _objectMover.Jump(15); } }