Is there a way to share each player's raycast pointer/cursor with the other players in realtime? I'm using PUN2 and MRTK2 and Hololens 2.
Approaches I've tried so far:
- I tried a naïve approach of modifying the MRTK provided
ShellHandRayPointer
to contain a PhotonView and then using that on theMixedRealityToolkit
object within the scene, but that seems to have no effect. - I've tried creating a cursor prefab based off of MRTK's
CursorFocus
in which I add aSurface Magnetism
component (tracking the hands) and then instantiate this prefab for each player in PUN2'sOnJoinedRoom
callback. After the instantiation call, I add the object to a non-rendered layer for the player with the goal of hiding it for the local player but allowing it show up for other players. This seems to hide the object as expected when only one player is in the room, but when a second player joins, the first player then sees a cursor show up that tracks with their hand movement, which seems unexpected to me (of note is that I'm using one Hololens 2 headset with a computer acting as the second player). Though perhaps this "crossed" behavior is due to theSurface Magnetism
component?
Thanks!
Step-by-step images of how I modified the ShellHandRayPointer
with a PhotonView and then reattached to the MRTK system:
MRTK system part 2: reference to cloned ShellHandRayPointer
:
my cloned ShellHandRayPointer
part 1:
PhotonView components expanded on the cloned ShellHandRayPointer
: