- Home /
why is torque always the same?
no matter what script you use,
function FixedUpdate () {
rigidbody.AddTorque (Vector3.up * 10);
}
or the add relative torque:
function FixedUpdate () {
rigidbody.AddRelativeTorque (Vector3.up * 10);
}
no matter what number you set it to on either script, the rigidbody rotates the same amount?
ie:
function FixedUpdate () {
rigidbody.AddTorque (Vector3.up * 10);
}
would equal:
function FixedUpdate () {
rigidbody.AddTorque (Vector3.up * 10000);
}
in rotation speed?
Answer by Eric5h5 · Oct 26, 2010 at 07:55 PM
Increase the Max Angular Velocity in the physics settings.
wow. i feel like a noob.i alway uncheck use gravity so that it stays at "eye level" and i cant believe i didnt think about adjusting the angular drag. anyway, that's exactly what i was talking about. i wanted to change how fast it rotates, so now i know to change the angular drag, not "speed." THAN$$anonymous$$S!!!
Actually angular drag and the max angular velocity are two different things, but both would affect how fast an object can rotate.
Answer by Adam Rademacher · Oct 26, 2010 at 05:49 PM
Try multiplying by Time.fixedDeltaTime. I think you're just adding far more torque than you need every frame...Multiplying by delta time will normalize it to seconds rather than frames.
Force and Torque should not be multiplied by Time.fixedDeltaTime. As far as I know, the physics engine already adjust for varying time delays.
Also, see Jesse's answer here: http://answers.unity3d.com/questions/31650/can-time-deltatime-work-to-addforce-on-rigidbody-over-time