The problem:
I have coded a little plane which is controlled using WASD & QE. Currently the plane consists of a single union with a body velocity and body gyro for movement. As filtering is enabled, when a key is pressed, a remote event tells the plane which key, and the plane responds accordingly.
Link: https://www.roblox.com/games/1378846432/Naco88s-Place-Number-396
Locally in studio it works seamlessly. However when running it in game, I experienced some lag.
To try and get around this, I tried setting network ownership of the plane union to the player,
Plane:SetNetworkOwner(player)
This seemed to fix the major lag issue in game so I continued.
However, when showing the plane to a friend at college today (on the very slow network) in game, movement still took a few seconds to respond, even though I thought i’d fixed the issue by setting network owner.
My dilemma is, should I be worried? Though it works fine on my decent internet, the fact lag still exists on slower networks is a big issue for me.
Solutions I have thought of
- I have considered moving the planes locally and constantly sending its position and rotation to everyone else in the server, but this seems a bit hacky and I’m not sure if Roblox can cope with that.
Games like jailbreak and tiny tanks seem to move vehicles locally and replicate them to the server, I know this is also possible with Roblox vehicle seats. So my question is: is there a built in way to do this?
If not, can anyone recommend the best way of coding it in?
Thanks