microsoft / mixed-reality-extension-sdk

The Mixed Reality Extension SDK enables developers to build 3D world extensions for AltspaceVR, using Node.JS.
MIT License
142 stars 61 forks source link

Actors with orphaned ownership will properly update upon new authoritative user #743

Closed norybiak closed 3 years ago

norybiak commented 3 years ago

From my testing, _rigidBodyDefaultOwner has already changed to the new authoritative user before userLeft() is called. This means that the actors owned by the user that just left changes ownership to the new authoritative user without the actor being orphaned.

However, if an actor were orphaned, it wouldn't properly update ownership when a new authoritative user is assigned. This fix ensures that ownership is properly changed.

Related issue #742

This PR is required for PR #744