[Plugin] Leap Motion - Event Driven

That’s a bummer, that said atm this issue doesn’t appear to happen in the new alpha preview. If it’s not urgent wait a couple of weeks for the public release, hopefully it will resolve things :). If it’s urgent and you don’t mind giving early feedback, pm me your username.

It’s in a very functional but trimmed featurewise state. If you’re ok with a bit of spotty documentation, pm me your username and I’ll add you to the preview repo.

Custom mesh

Hi, we’ve been trying to implement our custom hand meshes to replace the example ones.
To make it work out of the box without changing any of the existing blueprints, we have set up the same bone structure as the one used for the example hands.

The hands work but there are some problems with the standard hands that are included with this plugin.

A significant amount of bones seem obsolute? I could be mistaken, but I don’t see them referenced in your code anywhere. Even if you delete them, everything still works.

The right hand rig’s bone orientation is completely wrong. x-axis should be pointing up (not sure if this is intended?).
From rigging point of view this is very time consuming since the bones are setup wrong. 3dsMax and Maya cannot easily mirror bones over the x-axis.

Basically to make our hands work, we have to copy these “mistakes” over. We were wondering is this is intentional or not?


.

You are correct on all counts.

In the current public version of the plugin the floating hands were done as a combined mesh and I didn’t clean up the rotations back when these were made (cost of learning as you go). The alpha plugin has this fixed by using separate hand meshes which have their orientations appropriately placed.

Even without the alpha plugin though, you still have options. If you look at the animation blueprint you can change the offsets used for each hand (pre and post base) to match your hand setup. You can also use Animation Retargeting to remap bones https://docs.unrealengine.com/latest/INT/Engine/Animation/RetargetingDifferentSkeletons/ and add offsets there. If both of those options don’t suit, pm me for access to the alpha plugin.

Thanks for the suggestions, we’ll look into it for now.

So it seems I was wrong on the reasoning for this setup. After checking with the original rigger of the hands apparently this is typical for animators, the reasoning is that if hands are rigged this way, closing your hand will always be a positive rotational value.

The reasoning shouldn’t matter however since the solution is the same. When you send your leap input which happens in LeapAnimBodyConnector in the current public plugin there are rotation adjustments that happen to ensure all rotations are X=forward from the leap input.


You’ll notice the left and right base rotations are different. This is to account for the aforementioned rigging setup. If you have both your hands setup e.g. like the left hand, then you can just set the Right Pre and Post base rotations to match your left ones and everything else can stay the same.

A similar approach is available in the preview plugin, but the rotations have moved into the anim blueprint instead.

Hope this helps :slight_smile:

Leap Motion Interaction Engine for UE4?

Hi everyone. I’ve been using the leap for a while and I love it, but I always end up using a hack to get the sort of interaction I’m after. However, the Interaction Engine, that is now integrated in Unity, seems to be awesome at dealing with those problematic behaviours that I’m dealing with. I’ve been looking though this forum, google and so on but I can’t seem to find any sort of info regarding if that’s coming to Unreal at some point in the future. Can anyone shed some light on this topic? Thanks

There’s a pretty big update to the plugin in the works right now and available in closed alpha if you’re willing to give feedback. While there’s no interaction engine just yet (things take time) interaction workflow is being taken into account and you should have a much easier time getting up an running with the new plugin. Stay tuned :slight_smile:

Wow, that sounds awesome! We are actually a consolidated VR company in London and we just started doing a few projects using the Leap. It would be great being able to provide some feedback. Also, we’d definitely love to join the closed alpha!! How can we do so?

PM me with user names of people wanting access and a bit of information on what features/etc you expect to use the most.

Hello! May i join the testing as well? I work for a VR company in Moscow, we’re doing a VR park platform (software and hardware) and we use leap in our own game that we’re currently working on. Apart from usual hand tracking i work on a task that requires raw leap image processing. And i’m looking forward to seeing what improvements were made. Thank you for your work, it’s great!

Anyone tried to use with Google Cardboard or Samsung Gear VR?

[;730782]
Anyone tried to use with Google Cardboard or Samsung Gear VR?
[/QUOTE]

I don’t think there’s any drivers available for Android. Also, Samsung Gear VR takes up the only usb of the device so no way that I know of. But Leap Motion is working on it: http://blog.leapmotion.com/mobile-platform/

https://developer.leapmotion.com/android#107

Hello again. I was wondering - is there any specific reason the wrist position is not scaled (ConvertLeapToUE function used instead of ConvertAndScaleLeapToUE)? Seems like it’s the only bone that is processed this way. Couldn’t find the answer. I know that bone is kind of special one as it has no direct connection to any other bone, but it’s still not clear to me.

This was fixed in a pull request a while back:

it was an oversight :slight_smile:

oh, my bad, no good to use an outdated plugin version. thank you :slight_smile:

Hello,
I’d like to know if there is some way to capture one hand on top of the other hand while using leap.
I’ve been stuck on this for a while now and would appreciate any help Thank you.

Hi, thank you for this great plugin.

I have a question about using this plugin with the Flex branch of Unreal: how do I make the left hand work with Flex objects?
I am using Flex UE4 + LeapMotion + Oculus DK2 to accomplish something similar to this: v=Fv9QGPCppwE.

I have created a new Game Mode blueprint that uses the LeapFloatingHandsCharacter pawn, as per the instructions.

When I try to interact with a flexSphere, only the right hand works:

Interestingly, the left hand collisions work with non-Flex meshes.

Does anyone have an idea what is wrong? Thanks

Hi, I sorry to brother you , I need use this plugin in UE4 c++ Project ,but in the page,I find you “C++ how to” is not upgrade .Is there any possible to renew this thread recently?

Do you mean when you occlude one hand with the other? The current leap tracking should be able to still capture the top hand when it is visible, but the other hand will be physically occluded from the cameras. You may wish to elaborate what you wish to specifically accomplish.

PM me your username and I’ll add you to the preview plugin which has C++ support.

The current v2 plugin uses two meshes, one for each hand, check the blueprint to ensure both of these are setup to work with your Flex objects. e.g. LeapRiggedEchoHandsActor.uasset

Thank you for your answer. What I had to do was indeed to add extra capsules to the finger meshes and to make sure that their collision system was set to block Flex objects.

I have another problem now: the hand meshes appear at the wrong position now. In the screenshot below, the hand is right in front of my character, and it appears closer to his head.

I have tried disabling the plugin/restarting UE4/reenabling the plugin/restarting UE4 and the problem is still there. Even when I create a new project and follow these instructions I still get the error.

This problem appeared when I double-clicked the LeapEchoHands_AnimBlueprint animation blueprint in my project. Before opening it, UE4 told me asked me to rebuild the mesh (or something to this effect) and I clicked yes. Now I can’t get back to the working setup of the leap hands.

Interestingly enough, my project is source controlled and I do not see any changes to the LeapEchoHands_AnimBlueprint file.

Any ideas on how to restore the working leap animations?