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

Place plane by 4 AirTaps (1 per vertex)

Good morning,

I need to position a 3D plane in a hole in a real wall in front of me. To do this, I have thought about making 4 airTaps in its four corners of a hole(with spatial mapping hit) and positioning it, making the position and angle coincide close the hole perfectly.

I also need the angle because it depends on which hole it is, the wall will have different inclination.

Does anyone have any idea how to solve this?

Answers

  • Options
    dbarrettdbarrett ✭✭✭
    edited November 2017

    For reference:

    Point 1 2

    Point 3 4

    If you are using Spatial Mapping, whenever you perform an airtap save the cursor position into a variable. Once you have four you can use your first point as like a reference and calculate the distance between the two points perpendicular to it (height and width) and use that information to calculate the scale of a plane in the x and y. This should be true for all angles as long as they are on the same plane. If the hole covers more than one plane, for example a hole that is so big it is on two different walls, you would have to treat it as two different holes if that makes sense.

    Getting the plane in the center of the hole is a bit different. You could possibly take your first point and your second point and get the x-position halfway between them and then get your first and third points and get the y-position halfway between them and that should be the center of the hole and that should also be the center of your plane.

    Not sure if this will work or not. I would have to think about it a little more but, hopefully I sent you in the right direction.

    AR Developer

  • Options

    Hey, @gomes

    To geometrically define a plane only 3 points (not 4) are required. The fourth point may or may not be on the same plane. Strictly geometrically speaking it's always possible to run a plane through any 3 (non-equal) points, but not any 4.

    However you can first define the plane by the first 3 points and then use all 4 points to define a polygon within that plane that actually outlining your wall hole. The first 3 points will by definition already be on the plane. And the 4'th point will have to be projected onto it.

    Hope this helps.

    Building the future of holographic navigation. We're hiring.

Sign In or Register to comment.