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

TrackObject does not give same rotation as ChildOfController and FixedJoint #1171

Closed
virror opened this issue May 9, 2017 · 5 comments
Closed

Comments

@virror
Copy link
Contributor

virror commented May 9, 2017

Environment

Unity 5.5
VRTK 621e644

Steps to reproduce

Grab an object with TrackObject, then change that to ChildOfController and/or FixedJoint

Expected behavior

Grabbed object should have same orientation regardless of grabbing mechanism.

Current behavior

Different rotations for different grabbing mechanism.

From Scene #8
https://dl.dropboxusercontent.com/s/ubn7or8wvyn2ybe/shot_170509_162333.jpg
vs
https://dl.dropboxusercontent.com/s/spbnqgt44ydji0w/shot_170509_162431.jpg

@thestonefox
Copy link
Member

I think this is just a product of how the track object works.

By default the joint and child of controller mechanics just use the origin of the grabbed object (i.e. the centre point 0,0,0)

However, the track object also adjusts the rotation of the object, and if no snap handle is given to adjust to or precision snap is not set, then it will just rotate the object to it's origin which is 0,0,0.

This is why the track objects orientate themselves on first grab, which gives it that rotation.

I can see it could be considered a bug, but I'm not sure of any real solution as it needs to orientate itself when grabbed.

The solution would be to use a snap handle I guess?

@virror
Copy link
Contributor Author

virror commented May 10, 2017

Using snap handle does not solve the issue for me, i still get different results. Also i do thing the user expects all grab mechanics to give the same results regardless of using a snap handle or not? Otherwise its just very strange behavior from a users perspective imo?

@thestonefox
Copy link
Member

I don't disagree, but as I said I'm not sure of a workable solution due to the nature of how the track object mechanic works.

@virror
Copy link
Contributor Author

virror commented May 10, 2017

Its not a major issue, just something i noticed and reported : )

@thestonefox
Copy link
Member

PR #1377

thestonefox added a commit that referenced this issue Aug 27, 2017
fix(Interaction): determine grab rotation based on quaternion not eular - fixes #1171
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants