Hello everyone.

We have decided to phase out the Mixed Reality Forums over the next few months in favor of other ways to connect with us.

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.

The plan between now and the beginning of May is to clean up old, unanswered questions that are no longer relevant. The forums will remain open and usable.

On May 1st we will be locking the forums to new posts and replies. They will remain available for another three months for the purposes of searching them, and then they will be closed altogether on August 1st.

So, where does that leave our awesome community to ask questions? Well, there are a few places we want to engage with you. 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. And always feel free to hit us up on Twitter @MxdRealityDev.

How to calculate a realtime distane between objects?


I am integrating a new feature in my hololens app where user click and hold and drag the line will be create and it should display the distance of the end point.


User click on the one spot first and they click second spot app will create the line and it will display the distance.

My doubt is how to calculate the realtime distance using a hololens?
After i calculate it should give a atleast 90% of the same distance in realtime.


  • Hi - if you have the point at which the user first clicks in 3D space (i.e. X,Y,Z) stored in some Vector3 then as the user drags the end of the line to some other point in 3D space (i.e. X1, Y1, Z1) you can also store that in some Vector3. That first point is 'static' whereas the second one is going to change as the user moves their hand so you will be getting updates to X1,Y1,Z1 on some frequency and when you get the updates you can use something like Vector3.Distance to work out how far they are apart.

    Hope that helps and apologies if I misunderstood your question.

Sign In or Register to comment.