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

Tap to Place Issue

Hello,
I am having problems with a tall hologram automatically laying down as soon as I airtap it...
How do I resolve this so that when I Tap to Place it will always stay on its original axis?
Thanks for your help in advance!!!

Best Answers

  • Options
    holonutholonut
    Answer ✓

    Thank you for your quick response Jesse!
    I tried what you suggested and the hologram now stays upright! :)
    However by doing this half of the hologram (Building) does not rest within the spatial map drawn out for it.
    Half of the building goes above and half below?
    Any ideas?
    Thanks!

  • Options
    holonutholonut
    Answer ✓

    Never Mind...
    I have the answer to my issue!
    The origin point (aka pivot point, but useful to think of it as the origin of a 3D model) of the 3D game objects and its relationship to the invisible skin of the collider is what is important here.

    Since Unity isn't really a model editing tool (like 3DS Max, Maya or SketchUp etc..) it turns out that editing the pivot point of a 3D model is not an option in Unity (in the traditional sense of editing anyway).

    Since something like a default 3D Cube in Unity has its origin point in the center, and since you can't edit that origin point, when you move that 3D cube (by its origin) it will get placed at whatever location you specify, but the origin will be at that location not the bottom of the cube as you might prefer in this case, so half of the cube is above the surface and half below.

    This is one of the two common gotchas that people run into when using the TapToPlace approach to moving objects (which moves the object by its origin) both of which can be solved by using the wrapper empty gameobject parent approach to faking a new origin.

    1st common gotcha: If the origin of the object is not on the corner or surface that you would like to lock onto the destination point the object does not end up sitting where you want it.

    2nd common gotcha: If the origin point is located outside of the main 3D Object and you size your collider just around the main 3D Object the detection logic never fires and you can't move the 3D object. (as described in this post)
    Thanks again Jesse for your help!!

Answers

  • Options

    @holonut - The TapToPlace.cs script does try to orient the model to stay facing you. I don't know if that's what is tripping you up. You can try commenting out line 112 and see if that solves your problem.

  • Options
    holonutholonut
    Answer ✓

    Thank you for your quick response Jesse!
    I tried what you suggested and the hologram now stays upright! :)
    However by doing this half of the hologram (Building) does not rest within the spatial map drawn out for it.
    Half of the building goes above and half below?
    Any ideas?
    Thanks!

  • Options
    holonutholonut
    Answer ✓

    Never Mind...
    I have the answer to my issue!
    The origin point (aka pivot point, but useful to think of it as the origin of a 3D model) of the 3D game objects and its relationship to the invisible skin of the collider is what is important here.

    Since Unity isn't really a model editing tool (like 3DS Max, Maya or SketchUp etc..) it turns out that editing the pivot point of a 3D model is not an option in Unity (in the traditional sense of editing anyway).

    Since something like a default 3D Cube in Unity has its origin point in the center, and since you can't edit that origin point, when you move that 3D cube (by its origin) it will get placed at whatever location you specify, but the origin will be at that location not the bottom of the cube as you might prefer in this case, so half of the cube is above the surface and half below.

    This is one of the two common gotchas that people run into when using the TapToPlace approach to moving objects (which moves the object by its origin) both of which can be solved by using the wrapper empty gameobject parent approach to faking a new origin.

    1st common gotcha: If the origin of the object is not on the corner or surface that you would like to lock onto the destination point the object does not end up sitting where you want it.

    2nd common gotcha: If the origin point is located outside of the main 3D Object and you size your collider just around the main 3D Object the detection logic never fires and you can't move the 3D object. (as described in this post)
    Thanks again Jesse for your help!!

Sign In or Register to comment.