Hi!
i have a scene with some meshes and a FreeCamera, i interact with meshes using a Leap Motion. The user hands are represented by two cursors (two spheres in the scene). I need to set the cursors position relative to the camera orientation too.
At the moment i managed to do it relatively to camera translation, the cursors correctly follow the camera position in the scene. I can't set the correct cursors position if the camera rotates.
This is the code:
handCursorR.position.x = (camera._currentTarget.x) + frame.hands[0].palmPosition[0]/motionScaleFactor;
handCursorR.position.y = (camera._currentTarget.y-10) + frame.hands[0].palmPosition[1]/motionScaleFactor;
handCursorR.position.z = (camera._currentTarget.z+10) -frame.hands[0].palmPosition[2]/motionScaleFactor;