When I use BluePrint to get the Tip Postion of finger,and use Print to print the Position.But I found that the position is relative to the HardWare(LeapMotion). How can I get the World Position of finger in the world of UE4?
I solved 80% of this problem with the steps:
1.I found a BP “LeapAnimBodyConnector” under LeapMotion\Content\Blueprints\LeapConnectors,and thought the actor “DefaultModeSprite” is the LeapMotion Hardware. vector(50,0,-50) offset the camera.
- so I use Got the camera thransform and translate the (50,0,-50) to get the Position of LeapMotion,the rotation of LeapMotion is same as camera,so I can get Leapmotion transform.
- the hand and fingers were tracking,so I use Leapmotion transform to translate the bone position and direction.
4.use debug sphere drawing to show the position of finger.!!! when i use keboard to move my character and use mouse to rotate the camera, the sphere was still follow the finger!
5.Finally,I found that the sphere always 1~2cm offset from the bone. I can`t find the reason of offset.why? is it the wrong scale of my true hand with the mesh&skeleton ? or some bug of LeapMotion.
By the way, the LeapMotion equipment was the HP keyboard on my desk,not VR.