Comments (7)
Hi @cubesky sorry for a late reply!
I am not sure it's possible to get to that line of code if the boneNum is 0
boneNum relates to the joints index where 0 is the metacarpal. The check just above in this loop will continue to the next index if the BoneType is Metacarpal:
//Ignore the metacarpal as it will never really change. if (serializedHandBone.Type == Bone.BoneType.TYPE_METACARPAL) { lastBoneRotation = activeHandBone.Rotation; lastSerializedBoneRotation = serializedHandBone.Rotation; continue; }
Are you actually getting this IndexOutOfRangeException? if so, I am happy to add an explicit check for boneNum == 0
from unityplugin.
I'm using Pose Detector, but I can not find any example for Pose Detector on this version. So I use the following code on Pose Detector.
using Leap.Unity;
using UnityEngine;
[CreateAssetMenu(fileName = "GrabPose", menuName = "ScriptableObjects/GrabPoseScriptableObject", order = 1)]
public class GrabPose : HandPoseScriptableObject
{
public GrabPose() {
for (int i = 0; i < 5; i++)
{
this.fingerJointRotationThresholds[i].jointThresholds = new [] {
new Vector2(0,0),new Vector2(0,0),new Vector2(0,0),new Vector2(0,0),new Vector2(0,0)
};
}
SetAllBoneThresholds(0.8f, true);
Debug.Log(this.fingerJointRotationThresholds.Length);
}
}
from unityplugin.
Ah, the Poses are not intended to be made via code - but it's good that you've drawn our attention to it!
If you are hoping to detect grabs, I recommend using the code paths for this, as "grab" can often mean different things for different people, so isn't best represented as a pose (a complete shape)
If you do, however want to use Poses:
We actually have a collection of Poses that ship with the plugin, discussed in this docs page
You can also produce your own Poses by using the Pose Recorder Example Scene discussed here
from unityplugin.
Oh, Hand Pose doesn't show up in Unity, and the document not mention it.
I find it in the sdk forwarding your image! Thanks
from unityplugin.
Ah, I see! That is because it's in the Packages folder, not Assets or Scene, which Unity hides by default 🤦 (see the hidden files in this screenshot!)
from unityplugin.
Oh! Thanks! Now I can see them in select dialog. May be a document update for this?
from unityplugin.
I will raise a ticket for it :)
Thanks for raising this issue, I will now close it
from unityplugin.
Related Issues (20)
- Unit tests break downstream package dependencies HOT 9
- Linux Support HOT 1
- Scale problem HOT 1
- ExtendedFingerDetector doesn’t work with OpenXR HOT 6
- Final IK+Leapmotion, the arm is Twisted HOT 1
- Suggestion Adding OpenXR Hand Interaction Profile HOT 2
- offline document
- NRE on OpenXRLeapProvider when Initialize XR on Startup is disabled HOT 5
- Hand Gestures (Thumbs movement) not working properly HOT 3
- Plugin shouldn't force TrackedPoseDriver when using XR Plugin Management HOT 3
- Unity XR Hands integration HOT 1
- OpenXRLeapProvider not loaded HOT 17
- Error on HandPoseValidator.cs script HOT 3
- Android architecture warning HOT 6
- Unity MRTK Hand Mesh not detected and usable with Ultraleap Tracking Service Package installed on PC HOT 2
- Physical Hands Settings , vs . issue HOT 3
- [Feature Request] Support Desktop Mode for XRServiceProvider HOT 4
- MetaAimHand devices are not removed HOT 4
- OpenXR and XR Hands subsystem doesn't provide any data in Play Mode HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unityplugin.