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

2-hand manipulation makes objects always jump to .05 scale

Open KarlUweMartin opened this issue 6 years ago • 7 comments

Describe the bug

I'm working on an application that used to run smooth on HL1. I can load (instantiate) several objects and move them freely using the ManipulationHander & BoundingBox. Everything looks fine so far. Near interaction, rotation, highlighting etc. all works. But when I use two hands, to scale or rotate, all my objects transition to .05 scale (xyz) within a fraction of a second. I disabled all my code & functionality, but this is still happening. Changing settings like max/min scale did not help, either. There seems to be a new component "TransformScaleHandler" that's added in runtime. But disabling or changing its values still did not fix it.

Not sure what causes this problem, it feels like a bug.

To reproduce

Create an Object with:

  • BoxCollinder
  • BoundinBox
  • ManipulationHander
  • NearInteractionGrabbable

Then grab it with both handrays (bug also occurs in the editor)

Your setup (please complete the following information)

  • Unity Version 2019.2.11f1
  • MRTK Version v2.2

Target platform (please complete the following information)

  • HoloLens 2

KarlUweMartin avatar Feb 04 '20 11:02 KarlUweMartin

@MenelvagorMilsom, maybe something specific to the older one, or you think it also affects the second iteration of these two components?

wiwei avatar Feb 04 '20 17:02 wiwei

@wiwei I'll have a quick look today.

MenelvagorMilsom avatar Feb 05 '20 11:02 MenelvagorMilsom

I can't repro in editor or on device for either v2.2.0 or latest mrtk_development. Here's a gif I recorded with the set up described in To reproduce above, using 2.2 packages: two_hand_working

@KarlSupertramp, in your repro steps, did you change any of the properties of BoundingBox or ManipulationHandler? Also, can you try to reproduce on the latest mrtk_development and see if your problem persists?

MenelvagorMilsom avatar Feb 05 '20 12:02 MenelvagorMilsom

Ok sorry I forgot one part that happens before the object is instatiated. I'm using DOTween to smoothly load my objects into the scene ( transform.DOScale(startScale, 1f); ). The ManipulationHander or BoundingBox seem to save the scale value on Start(). I'll take a closer look into those classes, maybe I can find a workaround.

It would be helful to be able to manually update any values that are set at Start(). Feature Request?

EDIT: Resetting the host transform of the ManipulationHander, after the Tween fixed it for now.

async void MHFix() 
{           
 await Task.Delay(TimeSpan.FromSeconds(1));
            boundingBox.enabled = true;
            manipulationHandler.HostTransform = transform;     
      
}

KarlUweMartin avatar Feb 05 '20 13:02 KarlUweMartin

Cool. If you want to repurpose this issue as a feature request, or create a new feature request, feel free to do so.

MenelvagorMilsom avatar Feb 05 '20 14:02 MenelvagorMilsom

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.

stale[bot] avatar Jul 04 '20 16:07 stale[bot]

This issue has been closed by an automated process because it is stale. If this is still an issue please add a new comment with more recent details and repro steps.

stale[bot] avatar Aug 08 '20 03:08 stale[bot]