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 Pick Up an Object and Move With Hands?

Looking for a simple example of picking up/moving a 3D object with hands using Hololens.

Also, if the Hololens enters a different room, do objects "remember" where they were previously placed?

Best Answer

Answers

  • Options
    edited April 2016

    By hands do you mean "air Tapping" to select and then gaze to move the object and air tapping to de-select and placing the hologram? If so, then there are tutorials that show you how to do this.

    Or do you mean picking up and moving literally with your hands similar to other HWD devices being worked on in the industry?

    If so, to do this in HoloLens is a little more difficult. Keeping in mind that the HoloLens write-up says that the optimum placement of Hololight objects should be 1.25m - 5m . This basically means unless you have arms the length of 1.25m (~4 feet) , then touching and grabbing and moving the view of these holoLens won't be optimal. The average arm length is roughly 2-3feet, unless you're 8 feet tall...

    However to do it requires some logic that that uses hand tracking, spatial mapping, and world coordinates, and physics. You would have to build this algorithm yourself.

    Dwight Goins
    CAO & Founder| Independent Architect | Trainer and Consultant | Sr. Enterprise Architect
    MVP | MCT | MCSD | MCPD | SharePoint TS | MS Virtual TS |Windows 8 App Store Developer | Linux Gentoo Geek | Raspberry Pi Owner | Micro .Net Developer | Kinect For Windows Device Developer
    http://dgoins.wordpress.com

  • Options

    @jmatt0806 the Holographic Academy Gesture course chapter 4 helps you write this code.

  • Options

    I tried doing this once...
    my method is quite ugly,but this is how I did it.
    in the gesture manager from htk i modified "ManipulationRecognizer_ManipulationStartedEvent" where i took the Focused Object by gaze and then send to that object a message calling another method that I called "ModifyStart".
    Modify start method,in my case, accepts a Vector 3 which is the position of the focused object.

    In the "ManipulationRecognizer_ManipulationUpdatedEvent" I do almost the same thing I stated above. The only difference is that instead of sending ModifyStart as message, I call ModifyUpdate that accepts,again,a Vector 3.
    ModifyUpdate method verfies if manipulation is in progress,then makes this calculations from the academy:

    Vector3 moveVector = Vector3.zero;

            moveVector = position - previousPosition;
    
            previousPosition = position;
    
            this.transform.position += moveVector;
    

    the only problem with what i did is you should keep the cursor on the object while you are moving it.

    If i had the same (little)knowedge I have now back then I would've done it differenty. Infact,I suggest you to get the the focused object from gaze then if you want to move it with your had, simply assign the handposition (you can find it somewhere in HandsManager from HTK). Remember that this must be done runtime and a coroutine may help just to make things smoother. Before trying the coroutine though,try doing it with the update method :smile: .
    Hope this helps.

Sign In or Register to comment.