hi.
i am currently prototyping a vr hands sorta thing for a project but i cannot think of a way to replicate the local hand movement to the server without major lag(firing events every time the hand moves)
You’ll have to fire RemoteEvents every frame/time the hand moves, there’s no other way due to FilteringEnabled. That’s not as big of a problem as you would think, though: high bitrate is the killer, not the amount of events fired. As long as you keep that under control it should be fine.
You can replicate them using Remote events;
If you’re going to send CFrame(s) or Vector3’s to the server you can compress them into strings (or Vector3int16 if it’s a Vector3), thus using less bits & bandwidth usage.
I heard that Roblox already compresses data sent over remotes, but I think compressing CFrames are still necessary if you’re looking to send less bits.
I use these functions below whenever I make guns in my games or send the player’s camera cframe for replication.
function decompressCF(compressedCFrame : string)
return CFrame.new(unpack(string.split(compressedCFrame, ", ")))
end
function compressCF(CF : CFrame)
return table.concat({CF:GetComponents()}, ", ")
end
Like Rodtodon said, it doesn’t matter how much times you fire the event but how much data you send. I do hope Roblox adds something similar to UDP/unreliable remotes in the future…