PUN deployed with 2 hololens - position of the two players is inaccurate
Hi,
for my bachelor project I'm researching the different ways to implement collaboration on the hololens 2 and I'm using PUN and the provided MRTK fundamentals tutorial. (https://learn.microsoft.com/en-us/windows/mixed-reality/develop/unity/tutorials/mr-learning-sharing-04 )
I deployed it succesfully and I can connect the two hololens wearer to the same room (Though sometimes it's different - I think that it is when the master disconnects form the app - but if you know how to fix it it would also be great)
But what I have noticed is that the position of the other player (shown with a sphere) isn't actually at the same position as the other player (but it moves with him).
Do you know how to fix it ?
In the provided code when we start and run the function PhotonLobby.OnJoinedRoom() and start the game we create the player with this function:
private void CreatPlayer()
{ var player = PhotonNetwork.Instantiate(photonUserPrefab.name, Vector3.zero, Quaternion.identity);
}
Here I think vecto3.zero referes to the start position of the HMD and therefore it is not correctly shared if the two players don't start at the same position.
But not sure...
Comments
-
Players not meeting in the same room is covered by our Matchmaking Checklist. That should help.
Where you instantiate the avatars does not really matter as any movement of the users will update these (and set the current value). If more than one avatar is moving for a player make sure to check PhotonView.IsMine in the controller scripts. These are typically on the prefabs and if the other user is instantiating the same prefab, both instances react to input.
There is a section about this in the PUN Basics Tutorial, too.
0