The Mixed Reality Forums here are no longer being used or maintained.
There are a few other places we would like to direct you to for support, both from Microsoft and from the community.
The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.
For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.
If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.
And always feel free to hit us up on Twitter @MxdRealityDev.
Making gaze visible like a laser
I have a shared experience between 2 HoloLens. I want both users to see where they are looking at in the virtual world. Is it possible to make the raycast visible like a laser coming out from avatar.
(Something like the laser coming from the Infinity stone from Vision's forehead in Avengers)
Best Answer
-
Optionstimg mod
Take a look at Unity's LineRenderer. Using the remote head, start the line at the remote head's position and draw it in the direction of its forward vector. The endpoint of the line would be the point from a Raycast using those same parameters.
Some things to consider:
1) don't render the gaze vector for the current (local) user; use a cursor instead. It is super uncomfortable to see a line drawn in this way from your own head.
2) consider techniques to avoid the remote user pointing his laser in the other user's eyes. You could create a capsule collider around each user and if the raycast intersects with that collider, don't render the gaze vector line.5
Answers
Take a look at Unity's LineRenderer. Using the remote head, start the line at the remote head's position and draw it in the direction of its forward vector. The endpoint of the line would be the point from a Raycast using those same parameters.
Some things to consider:
1) don't render the gaze vector for the current (local) user; use a cursor instead. It is super uncomfortable to see a line drawn in this way from your own head.
2) consider techniques to avoid the remote user pointing his laser in the other user's eyes. You could create a capsule collider around each user and if the raycast intersects with that collider, don't render the gaze vector line.
Thank you, @timg That's great help