When do physics register for a static object meant to be simulated?

A while back, I had an issue in which immediate calls to NetworkOwnership failed. The call would throw telling me that I had anchored parts despite this not being the case.

Given that a lot of my parts consisted of welds, I assumed that the issue had to do with mechanism joints because after a while the call would work. This leads me to the current question: when do physics register for a mechanism?

To put the question into perspective: say I have an NPC in ServerStorage and move it to Workspace. Clearly, the NPC isn’t immediately placed in the pipeline but it is at some point. I’m thinking that this happens in the next physics step, so I would be safe for physics-based mechanisms after a Heartbeat.

3 Likes

This might be an old thread but I have an answer for myself now so in case anyone has the same question in the future here’s your solution: after Stepped. Like any other object meant to be simulated, a static object will enter the physics pipeline and start getting simulated after Stepped. :man_facepalming:

You can probably just wait on the first next Heartbeat to set network ownership. CanSetNetworkOwnership would be recommended if preferring to defer instead so the set happens ASAP, though that part should be automatically handled for you with Deferred SignalBehavior.