Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

BodyGyro doesen't rotate?

Asked by
drew1017 330 Moderation Voter
9 years ago
gyro = script.Parent.Parent['Red Barrel'].BodyGyro
gyro.cframe = CFrame.new(0, 3, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)

All settings except the .cframe are set to default, all the specified members exist, and Red Barrel isn't anchored. The BodyGyro stays in it's same rotation and can be pushed/rotated freely instead of locking onto the cframe. Help?

1 answer

Log in to vote
0
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
9 years ago

By default, a BodyGyro has a a maxTorque of 400000, 0, 400000. That means the object is free to rotate about its Y axis (looking down from above, it can spin like the hands on a clock) -- the BodyGryo will only prevent it from tipping.

Make sure the y is similarly big to prevent it from spinning.

If the model is very large, you might have to make the maxTorque or P properties larger.

0
I dont understand. The Y axis is up and down so doesent that mean a high y torque would prevent it from tipping, but not spinning? drew1017 330 — 9y
0
Also, if it can still spin side to side, why is it not looking at the CFrame? And another question: Can anchored parts with a BodyGyro still rotate? drew1017 330 — 9y
1
@drew1017 Q1: The X & Z axes would prevent the object from tipping. Q2: It's not looking at the CFrame, because the 0 maxTorque on the Y component means that it will spin FREELY. Q3: No, parts with a BodyGyro object will not rotate if it is anchored. Redbullusa 1580 — 9y
Ad

Answer this question