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
excuse me . how to do rotation an object?
Best Answer
-
Options
The code I am currently working with is an adjustment to the HoloLens academy code, this is in the gestureAction script
public float RotationSensitivity = 10.0f;
public GameObject ObjectRotation;private Vector3 manipulationPreviousPosition; private float rotationFactor; void Update() { PerformRotation(); } public void PerformRotation() { if (GestureManager.Instance.IsNavigating && InteractibleManager.Instance.FocusedGameObject == ObjectRotation) { // If user is moving their hand left/right (Navigation_X), rotate along the Y axis float rotationFactor_Y = GestureManager.Instance.NavigationPosition.x * RotationSensitivity; // If user is moving their hand up or down (Navigation_Y), rotate along the X axis float rotationFactor_X = GestureManager.Instance.NavigationPosition.y * RotationSensitivity; if (GazeManager.Instance.Hit == ObjectRotation) // Apply rotation to object ObjectRotation.transform.Rotate(new Vector3(rotationFactor_X, -1 * rotationFactor_Y, 0)); } }
5
Answers
The code I am currently working with is an adjustment to the HoloLens academy code, this is in the gestureAction script
public float RotationSensitivity = 10.0f;
public GameObject ObjectRotation;