Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolved rotation issue in TwoHandManipulatable script #2487

Merged

Conversation

shubhamarora28
Copy link

Overview

Issue:
If we change the rotation axis constraint at run time, it does not make any difference in the behaviour.

Fix: Reinitialize the rotate logic with the new rotation axis constraint every time the rotation constraint property is set.

Sample:
I have duplicated the TwoHandManipulationTest scene as TwoHandManipulationTest_Fix scene and have added the following game object into the scene content:

  • Model_Bucky_Rotation_Constraints_Test: This has a test script(TestRotationConstraints) attached to it and is intended to depict the solution to the issue.

Changes

Changed TwoHandManipultable.cs
Added TestRotationConstraints.cs
Added TwoHandManipulationTest_Fix.unity

@msftclas
Copy link

msftclas commented Jul 25, 2018

CLA assistant check
All CLA requirements met.

Copy link
Contributor

@StephenHodgson StephenHodgson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good and the test scene works nicely, but I'm not sure we need to add the test scene with the fix name in it. You can either rename it as an example and remove the fix suffix, or remove the test scene all together. Up to you.

private const string DescriptionPostfix = "\nTap on the model to toggle between X and Y constraints";

// Use this for initialization
void Start()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit missing private access modifier.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If not adding a fix specific test scene, I presume this file can be left out of the PR.

/// The TextMesh game object showing the description of the manipulation.
/// </summary>
[SerializeField]
private TextMesh descriptionText;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initialize with null

@david-c-kline
Copy link

You can either rename it as an example and remove the fix suffix, or remove the test scene all together. Up to you.

I'm good with not adding a new test scene.

Copy link

@david-c-kline david-c-kline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am 100% good with the changes in TwoHandManipulatable.cs and agree with Stephen that we do not really need a specific test scene for this fix.

Please remove the test scene and associated scripts and it should be an easy approve.

private const string DescriptionPostfix = "\nTap on the model to toggle between X and Y constraints";

// Use this for initialization
void Start()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If not adding a fix specific test scene, I presume this file can be left out of the PR.

@shubhamarora28
Copy link
Author

@davidkline-ms The test scene I had created has a game object(Model_Bucky_Rotation_Constraints_Test) that depicts the capability of TwoHandManipulatable to modify the rotation constraint at run time.
Instead of adding this as a new scene just for this fix, I was thinking if I can replace the original TwoHandManipulationTest scene with the one that I have added. Will that be okay?

@SimonDarksideJ
Copy link
Contributor

Does this fix also need applying to vNext ? @davidkline-ms @StephenHodgson

@StephenHodgson
Copy link
Contributor

We haven't ported it yet.

@david-c-kline
Copy link

@shubhamarora28, as long as we don't lose functionality in the existing example scene, I think that sounds fine.

Thanks!

@david-c-kline
Copy link

Does this fix also need applying to vNext ? @davidkline-ms @StephenHodgson

We haven't ported it yet.

It should definitely be added to #2465 for tracking.

Modified TwoHandManipulationTest scene to add runtime rotation constraint example
@shubhamarora28
Copy link
Author

@StephenHodgson @davidkline-ms Pushed a commit with all the changes.

@keveleigh keveleigh changed the base branch from june18_dev to htk_development August 1, 2018 18:33
@keveleigh keveleigh merged commit 7be94ea into microsoft:htk_development Aug 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Input System - General Legacy (HoloToolkit) Issues specific to the HoloToolkit product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants