1
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
namespace Lightbug.CharacterControllerPro.Demo
|
||||
{
|
||||
|
||||
public class AddTorque3D : AddTorque
|
||||
{
|
||||
new Rigidbody rigidbody = null;
|
||||
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
|
||||
rigidbody = GetComponent<Rigidbody>();
|
||||
rigidbody.maxAngularVelocity = maxAngularVelocity;
|
||||
}
|
||||
|
||||
protected override void AddTorqueToRigidbody()
|
||||
{
|
||||
rigidbody.AddRelativeTorque(torque);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user