BodyAngularVelocity question

So I’m testing it out, I managed to figure out how to turn a part that’s in the air. But even though I set the Max Torque to 0 once I’m done turning. It keeps on turning.

As can be seen here: https://gyazo.com/c098bfb871edf9ec6b725225a998a24f

I’m basically making a remote control drone system. So when I press A or D it should turn and when you release the key it stops. Should I be using CFrame tween instead for rotation?

MaxTorque defines how much force to apply to each axis to reach the goal angular velocity (defined by the AngularVelocity property of a BodyAngularVelocity object. Therefore, when you set this value to a 0-Vector3 [ Vector3.new(0,0,0) ], this means it cannot apply any force to attempt to slow (or accelerate) the part to reach its goal (BodyAngularVelocity.AngularVelocity). You may be looking instead for BodyAngularVelocity.AngularVelocity, which, if set to a 0-Vector3 [ Vector3.new(0,0,0) ] should stop the object from rotating, assuming the MaxTorque and P properties are capable.

Note: The BodyAngularVelocity object has been superseded by AngularVelocity, whcih should be used for current and future works.

BodyAngularVelocity simply adds angular force to the parent object. Since you’re operating the drone in the air, there is no friction to slow down the parts. Air resistance doesn’t exist in Roblox. This means even though you’ve stopped adding angular force, the angular velocity remains constant.

Now for the solution:
Instead of using a body mover, simply set the AssemblyAngularVelocity property to how fast you want it to rotate.

part.AssemblyAngularVelocity = Vector3.new(0,5,0) -- sets angular velocity to 5 
part.AssemblyAngularVelocity = Vector3.new(0,0,0) -- removes angular velocity

You can also set the angular values to negative to make it rotate the opposite direction.

Hope this helps! :slight_smile:

Cool, what if you have multiple parts in the model? Do you just weld them all to 1 part I guess will that work?

Yes, this would be the preferred way to go about this. Place WeldConstraints connecting each part to the PrimaryPart of the model, the PrimaryPart will be the part in which you change the AssemblyAngularVelocity.
Make sure all parts are unanchored as well.

1 Like

You could also use QPerfectionWeld by Quenty and set the Never_Break_joints to true to allow the motor to work