How to control the speed of AddForce (ForceMode.Impulse)?????
When I adjust the 'speed' of the AddForce, it actually adjusts the distance of how far my object dashes forward. If I increase the 'speed' (now called dashDistance) it just makes the object dash further. But the speed of the dash stays the same (it dashes almost in a blink), which is not realistic. How can I make my object dash in a 'slower' speed?
private float dashDistance = 75;
if (Input.GetKeyDown(KeyCode.X))
{
Vector3 camDirection = Camera.main.transform.forward; camDirection.y = 0.0f;
rb.AddForce(camDirection * dashDistance, ForceMode.Impulse);
transform.rotation = Quaternion.LookRotation(camDirection);
}
Comment