Hi, I’m currently working on a project that includes Players piloting a craft using a Vehicle Seat and Body Movers - However - Currently, the bodymovers are managed ServerSide and I’ve noticed a few performance issues with this including the craft stuttering when turning etc.
I was wondering if the best method to do this is to SetNetworkOwner to the Player who is driving and to control the Bodymovers client side as opposed to server side?
Typically, any player controlled assembly (characters, vehicles, so on) should leave the client authoritative of the physics while the server ensures that the client isn’t taking its authority too far (moving over great instantaneous distances).
Server-sided physics will always have that stutter: clients are able to run things much more smoothly than the server. It’s good to leave things such as the physics of a usable assembly to the client where possible, while also having the server scrutinise their activity.
The only issue I’ve encountered is now that the controls are Client-Side, Players no longer see other ships tilting.
The method I used for this is whenever the Steer changes, be it left or right - The ship (Using a weld) will tilt in that direction. However, as it’s local I can no longer do this.
Is there a way of doing this using a BodyGyro to tilt either left / right? I’m not too savvy with BodyGyro CFrame.
This is the current coding:
if (Pilot_Seat.Steer == -1) then
System.BodyMovers.BodyAngularVelocity.AngularVelocity = Vector3.new(0, 1, 0)
Tween(System.Exterior["Root"]["Tilt"], .5, Enum.EasingStyle.Linear,
{C0 = CFrame.fromEulerAnglesXYZ(0, 0, math.rad(15))})
This is a separate problem that would do you justice through creation of a new thread if not already done. Other clients should be able to see ships tilting as body movers participate in physics simulation and thus are bound to network ownership rules as well.
Quick plug that body movers are legacy and have been superseded by constraints. In this scenario the used items would probably be VectorForce and Torque. It’s up to you which system to push with though.