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

Implement interactions of holograms segments/parts with Unity3D

Hi all!

I'm creating a simple a very simple app by following the tutorials.
I've created the hologram of a motorbike (by importing a unitypackage of a motorbike), which is made by several "segments/parts" (frame,wheels, tank, handlebars, headlights);
The only interaction that i can have with these parts with the Hololens on is to let them drop once "clicked" , but:
1) these parts will disappear under the floor, without hitting any surface "real" or created with unity ( they won't roll similarly to Origami Spheres https://developer.microsoft.com/en-us/windows/mixed-reality/holograms_101)
2) The parts can't be dragged, once performed the gesture they will just drop down.

I would like that:
1) Parts will stop on a surface(not necessarly the "real floor" , even a plane added in Unity3D)
2) Once dropped, or even when "clicked", the parts can be dragged and moved in order to be re-attached to the "main structure". For example, drag a wheel away and than replace it.

Thanks in advance, Adriano

Best Answer

Answers

  • Options

    @dbarrett said:

    As for your second point of dragging and reattaching items to your model, you will have to come up with a way to do that yourself that best fulfills your needs.

    Can you suggest my a starting point?

  • Options
    dbarrettdbarrett ✭✭✭

    @AdrianoF Where I would start is create a layer and make your object all the same layer. I would also create a main collider and have a collider on every child. If your child collides with the main collider and has the same layer then put it into place. As far as putting it in the right position. You might need to make a script that holds all of the localPositions of the children.

    As far as that script goes, I would either create a dictionary, where the key is the child gameObject name and give it a Vector3 value as a local position or you might create a script that you attach to all of the children whenever you start the game and save their local position at start as well and then just set the position back to it whenever you want it to snap.

    AR Developer

Sign In or Register to comment.