Closed azinicus closed 7 years ago
Yea I was going to mention this too (on that exact object). I'm under the assumption that that was far from final or is that it?
The current demo scene is now fully incorporated into VRTK's main repo, but we haven't been able to find a simple fix for this issue yet.
@xEvoGx this issue would be considered an enhancement or a new secondary controller action.
The current one just uses LookRotation to move the object, which is going to cause unity issues when you move it into an origin position.
The current one is "good enough" for most cases, but a more detailed version would also be good.
To avoid this issue we would need to capture the primary hands (e.g. the hand holding the grip of a rifle) Up Vector (+Y) and apply that after the look at, no?
A held object would never roll (using the pitch/roll/yaw concept) away from the hand so this should work just fine.
So yea I took another peek at H3VR and yea they do exactly that. Roll (+Y) is locked to the hand while Pitch and Yaw are free to 'aim' towards the secondary hand which is nothing more than a pivot point.
Just food for thought.
Yeah I think having the Roll Y locked is probably a good idea. I did try and do that when I initially wrote the code but couldn't get it working.
If anyone has a way of getting it to lock then please let me know
Should be fixed with https://github.com/thestonefox/VRTK/commit/eb89a13f5460c5a71cf928b5f18f3dd0d2e59ee2
When working with the secondary controller example, there is a use case where when rotating an object with both hands, at vertical orientations (of the controllers) the object will start unnaturally rotating on the y-axis (World Space). This is problematic if you want to have an experience where users are using two hands to move and rotate objects. Here's a video of the issue in action.