How to make a turret rotate system?

How would I go about making a turret rotate system?

Would I use a BodyGyro ? Or make the turret face mouse CFrame every heart beat? I’m really not sure where to start…

Also, If I were to use BodyGyro for lets say, a turret attachment to a vehicle, I’m worried it would mess up the vehicles physics…

Any help is appreciated!

I would set the cframe with a runservice event. That way i can use a spring module and edit it easily.

Personally I prefer to utilize the physics engine whenever possible, so BodyGyro, but both ways should work.

That entirely depends on how you connect the turret to the vehicle, how big forces you use and the ratio of the turret’s mass and the vehicle’s mass.

For example, if you added a BallSocket connected to the vehicle’s roof and the turret’s center of mass, and put a BodyGyro or CFramed a part at the center of mass, then rotating the turret would not affect vehicle’s movement at all (though you would still have to consider the center of mass of the vehicle and the turret as a whole).

If I were to set the turret to massless, would that mess up the BodyGyro?

Not really, but if you do so, you will be able to use smaller forces in the BodyGyro.

That’s the problem, the vehicles turret is at the back of the vehicle.

How could I go about making this?

That entirely depends on your preference. To tweak the mass and center of mass of individual assemblies you can adjust Density or enable Massless property.

Keep in mind that if you set an entire assembly to Massless, at least one part in it will keep it’s mass.

The vehicle already has a part to control the mass of the vehicle.

But will the body gyro mess things up if its positioned on one side of the vehicle?

I wouldn’t use the bodygyros since roblox says they’re “outdated” or something, so use align orientation if you want to use bodygyros

1 Like