Title says it all. The function which uses AddTorque is being called but no torque is actually being added to my object. I’ve made sure there are no constraints, mass = 1, angular drag = 0.005. I’ve looked through tutorials and previous posts with the same issue and I’m sure I’ve covered all the bases. However, there’s no effect on my object! Any insight would be appreciated
void Start()
{
GetComponent<Rigidbody>().maxAngularVelocity = 200;
if (GetComponent<Rigidbody>() == null)
gameObject.AddComponent<Rigidbody>();
}
void OnMouseDown()
{
Sway();
}
private void Sway()
{
float turn = Input.GetAxis("Vertical") * 50 * Time.deltaTime;
GetComponent<Rigidbody>().AddTorque(transform.up * turn,
ForceMode.Impulse);
Debug.Log("called");
}