|
|
@ -62,12 +62,24 @@ public class BoatController : MonoBehaviour |
|
|
|
rigidBody.AddTorque(transform.up * -RotationFactor); |
|
|
|
} |
|
|
|
|
|
|
|
public void RowLeft(float velocity) |
|
|
|
{ |
|
|
|
rigidBody.AddForce(transform.forward * ForwardFactor * velocity, ForceMode.Acceleration); |
|
|
|
rigidBody.AddTorque(transform.up * -RotationFactor * velocity); |
|
|
|
} |
|
|
|
|
|
|
|
public void RowRight() |
|
|
|
{ |
|
|
|
rigidBody.AddForce(transform.forward * ForwardFactor, ForceMode.Acceleration); |
|
|
|
rigidBody.AddTorque(transform.up * RotationFactor); |
|
|
|
} |
|
|
|
|
|
|
|
public void RowRight(float velocity) |
|
|
|
{ |
|
|
|
rigidBody.AddForce(transform.forward * ForwardFactor * velocity, ForceMode.Acceleration); |
|
|
|
rigidBody.AddTorque(transform.up * -RotationFactor * velocity); |
|
|
|
} |
|
|
|
|
|
|
|
public void Brake() |
|
|
|
{ |
|
|
|
rigidBody.AddForce(rigidBody.velocity * - BrakeFactor); |
|
|
|