Reproduction Steps
This issue is extremely simple to reproduce but also having a major impact on using accurate physics in our projects.
When you anchor or weld a part, it will appear in different positions to different people (depending on who the owner is)
Repro: Create an anchored part and move it into the air
Insert a serverscript with the following code
I’m enabling an old flag that should fix this particular case. Will update once that’s set.
Before the part is anchored it’s position is changing from smoothly interpolated physics motion. Physics interpolation tends to be a tiny amount of time behind other replicated property updates, because it’s a separate network channel and more importantly interpolation necessarily adds some delay (you’re not instantly applying the latest result, but moving to it over time).
Anchoring the part disables interpolation instantly before it reaches it’s final position. We don’t send a CFrame update after anchoring the part, so it ends up locked at whatever position it was at on that machine when it was anchored. The “fix” just also sends a CFrame update when anchoring things, so when anchoring the client will always snap to the position the server had. Discontinuous, but you should get consistency.
Building your own physics system is going to be overkill to address this, since this issue is specifically around anchor property changes.
In terms of consistency I know there’s some other problems related to intrinsic ordering issues related to weld/assembly configuration changes and cframe assignments moving whole assemblies together, mostly only an issue when things are anchored. I had a larger change addressing this that I had on ice during a brief period we thought another networking change would obviate the need for it, which it didn’t. I’ll be trying to revive and ship those changes by sometime early next year as well.
Awesome! I figured this was some kind of out-of-order scenario.
By “custom physics system” I meant that we would do exactly what your proposed fix is, and have the server get sent the proper offset for our projectiles once they land. But if this flag fixes the issue we won’t need to implement this!
Can confirm a bug with anchoring and client syncing with the server, unsure if it is related.
Part is in Position A
Freeze the client briefly (ping spike or somehow freeze your entire Roblox client)
Move a part anywhere (Position B)
Anchor the part
Unfreeze client
On the client that was frozen, the part will be frozen at Position A and will not update to Position B until the part is unanchored.
This bug occurs at times in one of my projects and causes confusion with players.
Unsure if there’s an alternate fix to it, I’ve tried manually updating on the client through the use of remotes but that doesn’t seem to work effectively.
My bad, it didn’t actually get enabled. Try now.
One side effect of this change is that on the client it may now more consistently see the anchored part with a larger non-zero velocity than before, though this did occur before this change as well. That velocity should be consistent with the server. In some cases this may cause the humanoid to sink into, vibrate, or conveyor belt on the platform. You may want to explicitly zero out velocity after anchoring a part that was previously moving with physics.
The linked issue below was caused by the flag that fixed this case. I know this change as is may cause issues (it sends a CFrame assignment any time something is anchored) when things are only temporarily anchored. I’m not sure if that is why this issue occurred though.