Hi,
I noticed that in the Unity Hands Animation sample, the hand models are facing the user as if the user were looking into a mirror, while in the OpenGL sample, the hands were facing away from the user, as if the user were reaching into the screen.
I am trying to achieve the "reaching into the screen" effect in Unity and was hoping I could get some tips on how to do this :)
Thanks!
連結已複製
1 回應
After some tinkering, I've finally figured it out.
In the Hands Viewer Script that is attached to the Main Camera, I used the negative of the z-value of the 3D points and adjusted the value a bit.
Original:
myJoints.transform.position = new Vector3(-1 * smoothedPoint.x, smoothedPoint.y, smoothedPoint.z) * 100f;
Modified:
myJoints.transform.position = new Vector3(-1 * smoothedPoint.x, smoothedPoint.y, -1 * smoothedPoint.z + 0.5f) * 100f;
The hand model now reaches "into the screen". Woo hoo!
