MixedRealityToolkit-Unity icon indicating copy to clipboard operation
MixedRealityToolkit-Unity copied to clipboard

Pinch Slider visual(Thumb) gets displaced from track when there is rotation added to root.

Open satorihunter opened this issue 5 years ago • 2 comments

Describe the bug

While trying to interact with both near and far interaction, the slide knob visual (ThumbRoot) gets displaced a little from the track. This generally happens when some rotation value is applied to the pinch slider root during runtime. Though the functionality is intact and works fine, visually the slider doesn't look correct as the knob is offset from the track.

Use Case :

We have a model visibility slider which gets spawned by hand menu in front of the user. This makes the pinch slider root to have random rotation and position value based on user position. When the user tries to change the slider value, the knob moves out of the track and looks visually incorrect.

Steps to reproduce the behavior:

  1. Drag and drop the default PinchSlider (MRTK) to scene
  2. Reset the pinchslider root transform to 0/0/0 for rotation
  3. Play the scene and try to move the slider be near/far interaction - (works fine)
  4. Still in play mode, apply some random values for rotation eg( 32/-48/16)
  5. now try to move the slider knob, it immediately moves off track.
  6. you can see the offset value applied to ThumbRoot transform
  7. Kindly check the screen shots for more detail.

Expected behavior

Regardless of the position and rotation value on pinchslider root gameobject, the slider know should be connected to track and move along the track axis when moved.

Screenshots

MRTK_SliderIssue_01

MRTK_SliderIssue_02

Our setup

  • Unity Version 2019.4.12f1
  • MRTK Version v2.5.0

Target platform (please complete the following information)

  • HoloLens 2

satorihunter avatar Feb 23 '21 19:02 satorihunter

@julenka, could you please have a look into this?

satorihunter avatar Mar 01 '21 16:03 satorihunter

Fixed by this #9163 in 2.6.0

RogPodge avatar Jun 16 '21 20:06 RogPodge