Hello everyone.

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.
Options

How to calculate a realtime distane between objects?

Hi,

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.

Or

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.

Answers

  • Options

    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.