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.
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
multiple GestureManipulator in a scene
I have multiple GestureManipulator in a scene but want them to move individually. any advice on how to do this?
Tagged:
1
Best Answer
-
Options
Hi felsiska,
how do you determine which object you want to move?
I do it via Focus. I use the GazeManager and GestureManager from HoloToolkit for Unity and add a script to the movable objects that enables the GestureManipulator upon GazeEnter and disables it upon GazeLeave.It could look like
public class FocusedObjectReceiver : MonoBehaviour { [Tooltip("Object color changes to this when focused.")] public Color FocusedColor = Color.red; private Material material; private Color originalColor; void Start () { var manipulator = GetComponent<GestureManipulator>(); if (manipulator != null) manipulator.enabled = false; material = GetComponent<Renderer>().material; originalColor = material.color; } public void OnGazeEnter() { var manipulator = GetComponent<GestureManipulator>(); if (manipulator != null) manipulator.enabled = true; material.color = FocusedColor; } public void OnGazeLeave() { var manipulator = GetComponent<GestureManipulator>(); if (manipulator != null) manipulator.enabled = false; material.color = originalColor; } }
HTH,
Lars5
Answers
Hi felsiska,
how do you determine which object you want to move?
I do it via Focus. I use the GazeManager and GestureManager from HoloToolkit for Unity and add a script to the movable objects that enables the GestureManipulator upon GazeEnter and disables it upon GazeLeave.
It could look like
HTH,
Lars
@Lars_Roith
thx for the advice. works now with similar script.