How to add realistic air physic to roblox?

Hi,
I need to make realistic air physic in roblox, that when mesh has some velocity, it will rotate as in real world. Is this possible?

2 Likes

What, i think, that roblox physic cant help, and i need to use some code.

This is scripting support, not ‘please make code for me’.

Have a look at this wiki article: BodyAngularVelocity | Documentation - Roblox Creator Hub

1 Like

Ik this,
but i have no idea, how to make rotation effect based on mesh shape and direction.

Read some of the other posts on the forum, look at the level of detail people talk about the issues they have - we need more context!

You want something like lift and drag?

Ok, i try to redescribe it.
My problem is, that i use mesh as projectile and i set its velocity properity to some velocity based on my formula, but i need to make the projectile rotate, so it will look more realistic.

Nope. I think, that position is ok, but as i saied, the projectile will just fly and not rotate. But in real life, the part, where is more space behind center of grvity will rotate oposite to its velocity. This is easy to see on homemade rocket, where when there is too much space in front of center of gravity, it will rotate and not fly.

You can apply forces to an Attachment, and if the Attachment is off center then even a linear force will cause the part to rotate. Is this your goal? Add some Attachments to your mesh and apply forces there, rather than to the center of the mesh?

Ok, so this will use parts intertia to give the effect?

If you apply an upwards force to an Attachment at the nose of a plane, the plane will tilt upwards.

If you apply an upwards force to wings that are in front of the center of gravity, the plane will tilt upwards.

If you apply an upwards frce to wings that are behind the center of gravity, it’ll tilt downwards.

Is this your goal?

No, bec i am not having plane, but projectile and that has given velocity only when i shoot it and then, roblox physic will make ballistic curve.

it works the same for literally anything. doesn’t have to be a plane

If you want a ballistic curve just have thrust in the back and lift in the center of gravity, and gravity will pull the projectile down slowly. Experiment with the lift to tweak the length of the curve.

But, i set parts .Velocity, and this isnt on attachment.

If you set a part’s Velocity to something that isn’t affected by gravity, then it’ll cancel out the effects of gravity.

Use thrust relative to the projectile, and lift relative to the projectile, do not edit the Velocity directly, and gravity should work to give it a ballistic curve.

I do not think you need attachments for this, to be honest.

But thrust also edit position, i just need to edit rotation, so the projectile will rotate. I think, that whe are both speaking about something diferent, so here is vid of my problem


sry for bad quality, but for my internet, its hard to send it

Oh, do you want the projectile to orient towards its velocity?

I think you could do something like part.CFrame = CFrame.new(part.CFrame.Position, part.CFrame.Position + part.Velocity).

2 Likes