How does Torque work? How do I make it work properly?

I made a script for an plane flight


With AngularVelocity, I do plane alignment + up/down flight. all rotations are done relative to the position of the object itself,

With Torque I make a left/right turn. the turn is made relative to the world coordinates

-

I originally wanted to use two AngularVelocity, but they interfered with each other.

when I do an X rotation (it’s mostly just for visuals), it won’t affect the left/right rotation, since the rotation is done relative to the world coordinates

Video

Here’s a video of how it works:


And it seems to be super, all that’s left is to apply it to the plane, and that’s it, it’s done, but not.

After use on an airplane:

I’m just as frustrated as possible, because I don’t understand why on a simple block, everything worked fine, but after using it on the plane - Torque breaks the whole plane.

And I had to increase Torque many times, although I thought it was possible to leave the previous value. (From 50k to about 13m)

2 Likes

Is your airplane massless? try to change its density and it should behave as the block did.

1 Like

I did the math.
The mass of just the cube with the button and the seat ~47.6
plane mass ~30957

Yes i would imagine… so take all the parts of the airplane and set them to massless, except ofcourse your existing seat block:

Also, just for the future, you can obtain the entire model’s mass by checking its AssemblyMass property.

I misunderstood you a little bit at first, gave you the answer, and then when I realized what you meant, I went to check.
Well I did and yes it helped, thank you.

Only I will have to experiment a little with the mass of the cube, because I barely touched it already flies into space.

Video

And as I understand the mass can be done more, but apparently when the object becomes too heavy for Torque, such bugs begin.

When I counted the mass with the script, I got 30k+, so I didn’t believe AssemblyMass, but I just recalculated again and got 6k+ mass and it matched AssemblyMass. Apparently, then I wrote a crooked script.

I thought it would have some effect on the destruction of the plane (parts would fly apart from any contact), but all is well

Video

That’s what it’s made of a lot of parts for, to fall apart. It’s necessary for my game.

1 Like

Sometimes the assemblymass isnt calculated correctly by roblox, it changes when you play with the model and add parts, but once you play test, i believe the new calculation is then accurate again.

Those words don’t make sense.
I made the weight of the cube the same as the weight of the whole plane, and everything works fine.
It turns out that if the mass is distributed among multiple parts, then Torque works kind of weird, but when the same mass, only on this cube, then everything will be fine.
In short, it’s a mystery to me what logic Torque uses.

1 Like