mixed-reality-extension-sdk
mixed-reality-extension-sdk copied to clipboard
actor-update doesn't function properly due to peer authoritative mode
in trying to get the hand position of every user in the world, I use the attachment feature on creation of an actor. this works fine for the 1st client (the authoritative client), unfortunately other users hands/actors are ignored. I have traced this down to rules.ts. I have commented out the check for client authoritative and now all client updates (hand positions) are coming in.
for 'actor-update', now allowing all messages through (reguardless if client is authoritative). if (syncActor) { // && (client.authoritative || syncActor.grabbedBy === client.id)) {
I have no idea though, if this will mess up other things. but it does seem to let me get at my goal of getting the hand position of all users in the world.
It appears that this particular issue is a result of the CanSync method in MRE Unity Runtime.
The authoritative peer doesn't send the subscribed transform data for actors attached to other users hence why removing (client.authoritative || syncActor.grabbedBy === client.id)) fixes the issue.
Excellent sleuthing! It looks like that conditional needs an additional check to let the transform through if it's attached and it's coming from the attachment owner. Then, the transform should be allowed to propagate to the app, but not propagate to other clients.
Seems there also might be a similiar issue with collision updates for attached (to each user) kinematic rigid bodies. Need more testing to see whats happening.
still a problem