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 (but not on a mesh)

Hi,

I want to be able to move a hologram similar to the Holograms App on the Hololens. For example, when you select a hologram, you can place it anywhere in your room, it does not have to touch a mesh. This way, I can have a hologram float in the air.

I've been able to use the TapToPlace script to select my hologram and use gaze to move the hologram to where it hits a mesh. This makes sense to me. However, to have a hologram float in the air means my gaze will not be intersecting a point for placement.

Any suggestions on how to get started?

Best Answers

Answers

  • Options

    David,

    Thank you for the quick reply. That makes a lot of sense actually. I'll give it a try and report my findings later. Many thanks!

  • Options

    @bulgogi,
    You are very welcome. :)

    Thanks!
    David

  • Options

    It worked nicely. Now my app will float 2 meters away from the camera if it doesn't hit a mesh. If it hits a mesh, it will sit on the mesh facing the camera. How do I make the hologram hug the surface of the wall (parallel to the wall)?

  • Options

    Currently, depending on where I'm standing, the hologram sticks out of the wall at an angle because it's trying to face the camera. Thanks!

  • Options

    Thank you David, this worked.

    However, the cube that is being created in Placeable to indicate the bounds of my Game Object is way too big causing it not to be placed on walls that should have enough space. I traced it to the following code in Awake():

    // Create the object that will be used to indicate the bounds of the GameObject.
        boundsAsset = GameObject.CreatePrimitive(PrimitiveType.Cube);
        boundsAsset.transform.parent = gameObject.transform;
        boundsAsset.SetActive(false);
    

    I wanted to add the following to determine the size of the cube:

      boundsAsset.transform.localScale = Vector3(0.1, 0.04, 0.02);
    

    but it didn't work.

    Thoughts?

  • Options

    Thank you David and Patrick!

Sign In or Register to comment.