I am having an issue getting the torque I want in unity. Nomatter the value I try to get out of it- it always seems to top out a 1. I cannot even get a lever to overcome gravity yet with this, does anyone know how to overcome this?
Sample torques I used with fixedUpdate:
Cube.AddRelativeTorque (100,100,100);
Cube.AddRelativeTorque (1,1,1);
public float Test = 0.05F;
public float Test = 100.05F;
Cube.AddRelativeTorque (Vector3.one*Test);
Did you try adjusting Unity - Scripting API: Rigidbody.maxAngularVelocity ? Things won’t spin very fast with the default setting.
1 Like
This, made me waste waaaaay too much time.
Well that helps for later on- but I need more torque, not speed. I can get a lever to lift a feather but cannon lift a water bottle essentially.
Have you set maxAngularVelocity to some very high value and confirmed whether it works? Despite the name of the property, it’s not just about speed. Try setting it to 10000 in Start(). With the default settings, I doubt you can get a hinge joint to make a complete rotation using AddTorque.
Even setting maxAngularVelocity to 1 million the torque is still unbearibly low. If I turn on and off gravity I can get the object spinning very fast, but torque still cannot lift a 1 unit long .1 unit mass object from it’s edge.
If you want, upload a sample scene and i’ll take a look.
otherwise, this tutorial:
will help a lot, if you don’t wanna watch the whole video(although i highly recommend this guy)
skip to 1:17:00, this is the bit that concerns you
That would have been helpful a while ago huh… sorry. (also couldn’t figure out how to upload scenes, the forum didn’t like the file type. So here are some pictures instead)
Ignore the unassigned cube part, it’s fixed