i have a script responsible for rotating a boat relative to how fast it is going, the faster it goes the smaller the rotation is.
so im dividing my rotationSpeed by the currentPower, and its working fine.
problem is, when the currentSpeed value is at its lowest it rotates faster than i would like, i want to set a minimum rotation speed to prevent it from happening, but still keep it transitioning smoothly between those values
heres the relevant part of the script
the minimum speed is when currentPower == 0f
//Turning boat
if (currentPower == 0f)
{
float rotation = Input.GetAxis ("Horizontal") * stationaryRotationSpeed;
rotation *= Time.deltaTime;
transform.Rotate (0, rotation, 0);
}
else if (currentPower != 0f)
{
float rotation = Input.GetAxis ("Horizontal") * rotationSpeed / currentPower;
rotation *= Time.deltaTime;
transform.Rotate (0, rotation, 0);
}