Hey, I thought it would be great to develop my own game. So, now I have a Problem with the controlls. The Player jumps when you press Space, but the problem is: the player comes back too slow. It’s a FPS game, so you have to be fast. But you can jump, and fly through the level, becuase the Player comes too slow back.
I tried to set the mass, Angular etc. higher and lower, but nothing helped. If you have a solution for this, pls help me!
Here’s the Code for jumping (if it’s helping you):
using UnityEngine;
public class jump : MonoBehaviour
{
private Rigidbody _rigidbody;
[SerializeField] private float _jumppower = 500f;
private bool _shouldjump;
private void Awake() => _rigidbody = GetComponent();
void Start()
{
}
// Update is called once per frame
private void Update()
{
if(_shouldjump == false)
{
if (Input.GetKeyDown(KeyCode.Space))
{
_shouldjump = true;
Debug.Log(“Initiating jump…”);
}
}
}
private void FixedUpdate()
{
if (_shouldjump)
{
_shouldjump = false;
Debug.Log(“Jumping!”);
_rigidbody.AddForce(_jumppower * Vector3.up);
_shouldjump = false;
}
}
}