|
|
|
|
|
|
|
|
|
|
public class RandomTorqueEveryXSec : MonoBehaviour |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Start is called before the first frame update
|
|
|
|
void OnEnable() |
|
|
|
{ |
|
|
|
|
|
|
torqueToUse = new Vector3(Random.Range(-maxTorque.x, maxTorque.x), Random.Range(-maxTorque.y, maxTorque.y), |
|
|
|
Random.Range(-maxTorque.z, maxTorque.z)); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Update is called once per frame
|
|
|
|
void FixedUpdate() |
|
|
|
{ |
|
|
|