#How to use torque to accelerate balls of various sizes to the same maximum angular velocity?

1 messages · Page 1 of 1 (latest)

delicate torrent
#

I have a rolling ball player that can change size but maintains a constant mass. I move it by using AddTorque(), using a force with a magnitude of 4d (where d is the player's diameter in meters). Due to how I set its maxAngularVelocity, its angular velocity (henceforth "angVel") cannot exceed 9 radians/sec.

When the player is 1m in diameter, adding torque will cause the player's angVel to increase until it reaches roughly 8 r/s. When the player is 0.05m in diameter, it accelerates to about 8.29 r/s. These are acceptable, although considering how a 0.05m player previously spun wildly when moving before I set maxAngularVelocity, I'm not sure why it stops at 8.29 instead of 9.

Anyway, the main issue is that, when the player grows larger than 1m, its maximum angVel drops to unwanted levels. For example, a 2m player can only accelerate up to roughly 5.7 r/s, a 4m player to 2.7 r/s, and so on.

My question is: how can I counteract this difference so that the player accelerates to the same angular momentum (preferably at the same rate, too) no matter its size?

weary robin
#

both of those will essentially ignore the moment of inertia of the object

#

Also be aware of this setting in the physics settings

delicate torrent
# weary robin use AddTorque in VelocityChange or Acceleration mode

Using VelocityChange made it so that the player accelerated too fast and decreasing the player's size also decreased its maximum angVel
Using Acceleration drastically decreased max angVel across the board and similarly caused it to decrease with player size
Also, the highest maximum angVel is still 8.29 r/s for some reason
Also, why did you bring up that physics setting? Given that I override it for the player only and set it lower than the global limit, why is it relevant in this case.

weary robin