Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How are physics managed between the server and the client?

Asked by 9 years ago

During my play time on ROBLOX I made a few conclusions about this subject.

I had experienced lag while touching bricks which were being processed by server physics, the game automatically switches the physics process to the client, to reduce the lag, since we're playing over a network. Some of these examples, are lobby balls and car controls.

One very common example, in cars, is that the physics process of the car you're driving, was assigned to your friend's computer.

As a developer, I care about my game's performance, knowing how to assign physics processes between the server and the client would be useful, indirectly or directly, since I'm suspecting server physics are assigned to the client when the player's character is near to the process.

My doubt is which instance exactly in the player takes control of this? (I'm working with custom characters)

UPDATE: :SetDesiredAngle() method of Motor, isn't working as expected on a LocalScript, the value isn't replicated to the server, only by setting directly the Motor's DesiredAngle property. The result is a non-moving motor, no local physics activity. Replication error: The motor can be moved with CurrentAngle property, not replicated to the server.

0
:\ Why did you send me here. EzraNehemiah_TF2 3552 — 9y
0
Sup oioi. MessorAdmin 598 — 9y
0
Sup FieryEvent 185 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

I am not aware of anything in the API that lets us distribute how physics gets managed.

My guess is that all physics is simulated on both sides, but what the server says trumps what the client says - except when it comes to a Player's Character (specifically animation, and perhaps any phsyics changes based on player movement -- which would include vehicle seats). If FilteringEnabled is on, whatever the client simulates stays on the client (except for the animations/player movement). Perhaps, if a player moves a brick (by running into it), that's calculated on the client and then propagated to the server - though I'd recommend testing that to be sure (perhaps by testing a place specifically designed to tell you about changes to, say, a specific part's position, and when the change was detected. You could check the developer console for output and compare the LocalScript's output to the Server's output. Use a 2nd account to get a second player and you might get more information).

0
Updated. FieryEvent 185 — 9y
Ad

Answer this question