I am trying to write a script that will add rotation (torque) to the rigidbody of an object. I thought this would be easy, but it has proved to be quite problematic. This is what I have-
function Update () {
if(Input.GetKey("e")){
rigidbody.AddRelativeTorque (Vector3.up * 10);
}
}
What am I doing wrong? I’m not new to Javascript, and this script is VERY straight and linear. It IS applied to my object, and I am pressing E. Here is my inspector-
This is really annoying.
Thank you