move and rotate holograms

need help with the GestureAction.cs for moving and rotating holograms.
I re-used the GestureAction.cs from Holograms 211.

What I want to do with the hologram:
•rotate object by holding and drag left-right
•move object by air-tap, gaze to re-position object, air-tap again to place object down
•move object across another 3d surface. thinking of locking one of the axis (eg: if object is to move across a 3d floor, y-axis will be locked)

Problems faced:
•able to rotate, but all objects with script will rotate together. how do I rotate them individually instead?
•not able to move at all. looks like it does not transition back to manipulation.

any advice on how to edit the script? Thx in advance

Answers

  • You can use taptoplace.cs (Holo Toolkit) to move holograms.

  • @shreyas23joshi said:
    You can use taptoplace.cs (Holo Toolkit) to move holograms.

    But not to rotate them. GestureManipulator is the best option.

  • @kotAPI @felsiska @shreyas23joshi Hello, I'm very new in Unity and Hololens. Now I can move my hologram(an assembly) with "Hand draggable", but how to rotate the hologram with holotoolkit. I finished all the acedemy tutorial, but there're no such scripts called"gesture action""gesture manager",etc in holotoolkit. So what scripts should I use to rotate and expand my hologram? Thanks a lot.

  • @lycheeyy hi!
    for the rotation problem you can use 211 tutorial at some point there, they rotate the Astroman(chapter 2) ... as per the expansion you shoul manipulate the transform.scale

    i suggest you tring to use two arrows indicating the rotation direction..then ontap over those arrows the designated object will rotate. declare the object as public so you can drag any object you want in untiy's framwork and you have control.

    the arrow object will have a script that looks like this:

    public GameObject toRotate;

    public float rotationscale;

    OnSelect()
    {
    get toRotate transform.rotation valie then multiply it to the rotation scale.
    may be set the toRotate object's rotation != 0 so that you can manipulate it
    }

    you can try the same logic with the expansion :)

    i hope this can help.

  • Hi, you can try my full tutorial on how to move, resize or rotate objects in your HoloLens apps using MR-Toolkit-Unity 2017.2 version (as latest as it gets) https://codeholo.com/2018/05/06/move-resize-and-rotate-objects-in-your-hololens-apps/

Sign In or Register to comment.