microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6k stars 2.12k forks source link

Using localspace constrained RotationAxisConstraint on Objects with ObjectManipulator requires Handgestures to be performed around world's axis to effect local rotation. #10183

Closed Dominik-Schoen closed 9 months ago

Dominik-Schoen commented 3 years ago

Describe the bug

Near rotation gestures are only sensed in global-space and not local-space when using a local-space constrained RotationAxisConstraints. This leads to an issue, when the local-axis do not match with the world-axis anymore. Thes user has to perform the Rotationgesture around the world-axis to manipulate the respective local-axis.

For example, if an object is limited to Y rotation in local space (using the RotationAxisConstraint) and rotated by 90° on the X axis, the user must perform a rotation gesture around the world's Y axis to achieve an actual rotation of the Y axis in local space. However, it would be expected that the user would have to perform a rotation around the local Y axis for such a rotation.

To reproduce

Steps to reproduce the behavior:

  1. Create a Cube
  2. Attach Object Manipulator Script and disable Allow Far Manipulation
  3. Add NearInteractionGrabbable Script
  4. Add MoveAxisConstraint and set Hand Type to everything, Proximity Type to everything, Constraint On Movement to everything and check Use Local Space For Constraint
  5. Add RotationAxisConstraint and set Hand Type to everything, Proximity Type to everything, Constraint On Rotation to X Axis and Z Axis, and check Use Local Space For Constraint
  6. Rotate Cube 90° around x Axis
  7. Hit Play
  8. Perform Near Rotationgesture around cube's local y axis
  9. Cube does only rotate as expected when gesture is performed around world's y axis

Expected behavior

The near rotationgesture axis should match the local axis when using local space constraints on a rotated object.

Screenshots

https://youtu.be/XA469VLH04Y

Your setup (please complete the following information)

Target platform (please complete the following information)

david-c-kline commented 3 years ago

This will also need to be covered in v3.0

stale[bot] commented 2 years ago

This issue has been marked as stale by an automated process because it has not had any recent activity. It will be automatically closed in 30 days if no further activity occurs. If this is still an issue please add a new comment with more recent details and repro steps.

IssueSyncBot commented 9 months ago

We appreciate your feedback and thank you for reporting this issue.

Microsoft Mixed Reality Toolkit version 2 (MRTK2) is currently in limited support. This means that Microsoft is only fixing high priority security issues. Unfortunately, this issue does not meet the necessary priority and will be closed. If you strongly feel that this issue deserves more attention, please open a new issue and explain why it is important.

Microsoft recommends that all new HoloLens 2 Unity applications use MRTK3 instead of MRTK2.

Please note that MRTK3 was released in August 2023. It features an all new architecture for developing rich mixed reality experiences and has a minimum requirement of Unity 2021.3 LTS. For more information about MRTK3, please visithttps://www.mixedrealitytoolkit.org.

Thank you for your continued support of the Mixed Reality Toolkit!