Can anyone explain how MotorMaxTorque works?

Hi there! For the past month most of my focus has been on a chassis I’ve been making for a project. So far I’ve had a single torque value, however I’d like to improve my simulation and dynamically change my HingeConstraintsMotorMaxTorque values based on the current RPM.

What this topic is about is how Roblox HingeConstraints measure torque. I wasn’t able to find much material online, though the wiki did state:

The units are mass * studs^2 / second^2

I’m confused about how time comes into torque, and maybe about some other things. Could anyone explain how Hinge Constraint torque works? Help is greatly appreciated.

Note: I’m on my phone right now so this post probably isn’t pretty at all.

Torque is hard to explain as it is dependent on vector calculations. Essentially, it represents a change in angular momentum that causes the angluar velocity to change or counters another torque. Since it represents the change in angular momentum, it is perpendicular to the rotation (cross-product) and is positive when the change is along a positive angle.

Constraints in Roblox try to reach the desired angular velocity while respecting the maximum acceleration and torque. When the max torque is infinite, the object will reach the angular velocity no matter whether it is a point or an entire building or if it is suspended or colliding (not always correct due to engine avoiding physical issues).

Max torque should be used whenever you want to simulate mechanical limits of engines or such. Just take the maximum force it can can counter and multiply it by the radius of whatever you want to spin and use that number.

4 Likes

Yep, the sad part is there is almost no information about it.

That’s because the information is related more to physics than Roblox itself. They should have written “How well a moving part can resist external forces” and there would be no confusion.

1 Like

Thanks! Unfortunately the part I’m confused about is what units I would use in the multiplication and all. I’d like to convert from real-life units for maximum simulation accuracy. For example, the peak torque of a car I’m working on is 760.61 Newton-Meters. If I multiply that by the wheel radius of 1.595, the result I get is about 1213.179. If I then multiply that by the first gear ratio of 2.85, I get 3457.560. If I then set the MotorMaxTorque of both the rear wheels to this amount (I think I would divide this by 2 in reality, as the powered wheels would receive a fraction of the engine’s output) the HingeConstraints are too weak to move the vehicle effectively. In 10 seconds I was only able to reach 25 MPH.

Could you clarify this for me? Thank you in advance!

1 Like

A meter in Roblox equals to 2.5 studs, but in default gravity 1 stud is 5 cm.
A kg in Roblox is 8 units of mass.

1 Like

Thanks a lot! I’ll look into implementing this soon and will tell you what happens :smiley:

1 Like

This seemed to have the desired result! :smiley:

1 Like