NoahRayburn
NoahRayburn2w ago

Have multiple clients apply a force to a rigidbody

Wondering if there's any way to have multiple clients be able to apply a force to the same rigidbody. I know that realtime transform will only allow the owner to modify the position of a rigidbody, just wondering if there's any workarounds to this of if this is something anyone else has had to solve before I am trying to build a system that allows two or more users to carry/lift the same object. I'm thinking I'll need to have the non owning clients send their desired physics input over an RPC to the owner and add that in
4 Replies
kapa.ai
kapa.ai2w ago
Hi @NoahRayburn. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- You're correct that with Normcore, only the client that owns a RealtimeTransform (and thus the Rigidbody) can directly modify its physics state. This is by design: the owner is considered the source of truth, and all other clients follow its simulation. If a non-owner tries to move the object, their changes will be overridden by the owner's state from the datastore. This ensures consistency and prevents conflicting updates across clients RealtimeTransform. Workaround for Multi-User Physics Input: The typical approach for your scenario—where multiple users want to "carry" or apply force to the same object—is for non-owning clients to send their intended input (e.g., desired force or movement) to the owning client. The owner then applies all received inputs to the Rigidbody and synchronizes the result via the RealtimeTransform. This can be done using custom RPCs or a shared model for input aggregation. This pattern is not explicitly detailed in the Normcore docs, but it is implied by the ownership model: only the owner can make authoritative changes, so all other clients must communicate their intentions to the owner, who then acts as the single source of truth for the object's physics state Networked Physics, RealtimeTransform. Key Points: - Only the owner can apply forces or move the Rigidbody. - Non-owners should send their input to the owner (e.g., via RPC or a custom model). - The owner aggregates all inputs and applies them to the Rigidbody. - The resulting state is synchronized to all clients via RealtimeTransform. This approach is common in multiplayer physics scenarios where multiple users interact with a single object, such as carrying or pushing together. If you need more granular control or true server authority, Normcore Private allows you to run a custom authoritative server, but for most use cases, the above client-ownership pattern is recommended Authoritative Servers. If you need code examples or further details, let me know! ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2w ago
<@493577791401361411> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Mechabit
Mechabit2w ago
you can do that but there will be at least a 1 second delay for when the non-owning player sends a force for the object to start moving due to interpolation. what you can do is move the object with springs so it's more visually forgiving rather than direct manipulation or you can create a ghost object for the non-owning player that shows the predicted position of the shared rigidbody
NoahRayburn
NoahRayburnOP2w ago
Ya I'm not exactly using springs but I am emulating spring like behaviour so hopefully that covers up some of the input delay. Was hoping there happened to be an existing solution out there but I think this should work

Did you find this page helpful?