Question: How to get the coordinates of the fingertip in 6.X #1333
-
Hello. In my project, I use Leap Motion Orion 4.1.0 and SDK 4.4.0 to record the coordinates of the right-hand index fingertip as text data. using System.Collections; public class RightHandIndexTip : MonoBehaviour void Start() // Save as text data in the HandData folder on the desktop void Update()
// Obtain coordinates of distal phalanx upper end, Index Tip
} However, when using this code with LeapMotion Gemini 5.7.2 and SDK 6.2.1, an error occurs in the Vector part of Vector positionT = boneT.NextJoint;. I am not familiar with Unity, so I don't really understand how Vector and Vector3 work. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @yukitatsuta The API documentation you have linked is out of date as it is on the older Leap Motion site (I will look to make this more clear in future) the updated version of the page you referenced is here As we moved the Unity Plugin to 6.0 we changed the format that our Frame data has. We stopped using our own Vector and began using Unitys built-in Vector3. We have some documentation on this available here With your code, you would change Vector for Vector3 and your code should continue to work. I would also recommend referencing a specific LeapProvider, rather than creating a Controller yourself (the LeapProviders handle that for you) Here is an example using your code as a base (the code you have shared is missing some lines inside the foreach loop, but hopefully you can understand what I mean):
|
Beta Was this translation helpful? Give feedback.
Hi @yukitatsuta
The API documentation you have linked is out of date as it is on the older Leap Motion site (I will look to make this more clear in future) the updated version of the page you referenced is here
As we moved the Unity Plugin to 6.0 we changed the format that our Frame data has. We stopped using our own Vector and began using Unitys built-in Vector3. We have some documentation on this available here
With your code, you would change Vector for Vector3 and your code should continue to work. I would also recommend referencing a specific LeapProvider, rather than creating a Controller yourself (the LeapProviders handle that for you)
Here is an example using your code as a base …