[Plugin] Leap Motion - Event Driven

Thanks for the reply !

I’ll give it a try and let you know how it goes.
( because I KNOW you’re on the edge of your seat )
:slight_smile:

Hi,
Thank you for your work.
I was wondering if there’s any way to animate my own rigged hands using the location and rotation data provided by the leap plugin.
Has anyone been able to do this using blueprints? I would appreciate the help.

Thanks !

Hi Catonice,

Could you explain your fix a bit more in detail?
If possible maybe show your complete blueprint? Can’t seem to get the floating hands to work…

Thanks !

This is done in blueprint inside the plugin itself, feel free to look into e.g. LeapEchoHands_AnimBlueprint.uasset to see examples of how it is done. For a reference on how the whole setup works see

https://.com//leap-ue4#convenience-setup-and-notes

Have you had a chance to look through https://.com//leap-ue4#how-to-use-it—convenience-rigged-characters and the main documentation in general?

Hey ,

Yeah, everything works, it’s just the grabbing with the floating hands I can’t seem to figure out.
Basic-rigged character works fine, but when I try to apply the grabbing to the floating hands it stops working when using the does implement interface.
Is it because there is no real mesh inside of the floating hands but a child actor?

So was just wondering how Catonice did his fix to get the grabbing working in the floating hands.

Thanks for the work on the plugin, really impressive to get your hands in VR.

I believe you’re right, the floating hands are built to support multiple types so the actual mesh will be in one of the child blueprints, open the floating hands character blueprint to confirm. You can also just place the floating hands actor into any blueprint of your choice and it should all just work out of the box.

e.g. the Plugins/LeapMotion/Content/Blueprints/Rigging/FloatingHands/LeapRiggedEchoHandsActor.uasset

i tried adding LeapController.h to my character class and its giving me this error: ‘Leap’: is not a class or namespace name. Do you know whats wrong with it?? Thanks

Is this is a C++ project? Have you added LeapMotion as dependency in your project build.cs?

Yup its a C++ project. Ive added the dependency with “LeapMotion”. I’ve manage a workaround where i created a copy of whatever leap motion character blueprint i need and change the parent of it to my custom own character class so i can modify it without affecting the source plugin. It works OK.

Another thing was the skeleton for the floating hands shows that it cannot find a skeletal mesh for that specific hand (left or right). I wanted to added Mesh Sockets but everytime i do it crashes. Im just using Bone Name at the moment.

This is an image of the error im getting:

http://imgur.com/a/UXwCD

I went into the file, LeapGestures.h, and added “LeapEnums.h”. Those error went away but another one came up saying “‘Leap’ is not a class or namespace name”

Image here:

http://imgur.com/a/v1MSu

Thanks for your help

For the skeletal mesh, can you show me a screenshot of the error it’s showing?

Regarding Leap.h, haven’t used this plugin in C++ for a long time, it’s due for a rewrite to make it more streamlined TBH. It appears the Leap.h header is exposed somewhere where it shouldn’t be, somehow the forward declarations aren’t doing their job.

I believe your best route atm is to use the workaround, I’ll make sure to test the rewrite, when it happens, for C++ use cases.

Hi ,

In my setup there seems to be quite a latency before the hands correct their position when moving the HMD sideways or up and down. As a result they have hard time staying in place. They jitter. In the LeapMotion vizualizer there’s almost no latency or jitter.

Could it be something in my UE4 config?

My setup: Ue4.14.1 / Rift CV1 / Leap controller firmware v1.7 / Orion 3.2.0 / GTX1080

I tried a screen recording but noticed that in the VR Preview window there is no latency. It’s only in the HMD.

1 Like

This has to do with lack of proper timewarp support, currently tracked as an issue: https://.com//leap-ue4/issues/9.

Modern HMD software stack is late updated in the render thread with a fair bit of magic to make sure the perceived latency is 0. Leap timewarp is the attempt of ensuring the latest available leap tracking data is orientation warped by the hmd rotation that happened since that sample was taken.

I did make an attempt of adding this feature, but so far it becomes unstable when you overdrive it (real jitter) to get 0 perceived latency. Something is still missing.

This is the major holdout for the UE plugin in the current state and I want to take another look at it, likely when I’ll do the modern rewrite for this plugin. If you feel like you can help, by all means take a look at the source :slight_smile: ! Perhaps someone will spot why our version of timewarp is jittery while Unity’s is not.

Cheers , I’m afraid I’m not able to help. But I’m sure hand tracking will gain a lot of interest. So help is on the way…

Can’t grab with Leap Motion

Hi, .

I’ am trying to make grab with Leap Motion for a week now and I can’t.

I tried downloading your Jenga Project and I choose Selected Viewport mode, because I don’t have VR and I can’t grab anything still with your written Blueprints.

I tried using older UE4 and Leap motion versions, but I did not succeed. Which versions should I use to set up grab without VR best? because I think in different versions the blueprints are different to, and I am new to them, don’t have any idea how to set up if they are different than in the tutorials. I also need that the set up would be in first person.

Some mechanics have changed, but the grab and release blueprint methods should still work, try to work through the example video and let me know where it stops working for you (e.g. v=GeLNoqAKoTg) you can also check out this series by Mauviel: v=fmtBQzD7ZFE&list=PLZgjuTxMC0h1ayYeTedOUL5fIOkxM8hj8.

Hi ,
is there a way to get hold of the thumbs up gesture?

For a chocoloade museum we are making a chocolade creation experience - based on the idea of the leap motion blocks demo.
It will be very cool, with 3 VR seats and loads of cookies flying around.

Thank you,

By the way, thank you for providing the awesome socketio-client-ue4: we use it for bluetooth access of a femto.io Arduino to UE4.

Glad the plugins are being useful :slight_smile:

You can determine a thumbs up state by getting the xvector from your thumb rotation and taking the dot product between it and the Z up vector (0,0,1). If it’s positive the thumb is pointing up. You can also use the dot product to get the angle between the two vectors which can allow you to only recognize a thumb up if its e.g. within ~ 30degrees from the vertical. Finally i’d also check if all your other fingers are close enough to a point near the palm to count making a fist (optionally use the grab event). Using those two criteria you should be able to determine a thumb up gesture (calculate on tick, if criteria is met send a thumbs up event or call your thumbs up function)

Ps: you should show some chocolate pictures when it’s released, i’m sure the hungry devs here would love the see it!

Feels like i’m going to cry. I just can’t get a working demo out of this

I’m using a Vive
Leap Motion Orion 3.2.0+45899 (firmware 1.7.0)
Mounted in front of the vive HMD
I created a new Unreal 14.3 engine project.
I enabled the Leap plugin
I restarted Unreal
I created a NewGameMode
I overrided the game mode with NewGameMode
I switched Default Pawn Class to LeapFloatingHandsClass
Launch VR Preview.
Vive works fine, but I don’t see any hands in front of me.

I just can’t get the hands showing up. Spent two days but no success…

Have you tried a 4.13 project? I’ve been getting some reports that 4.14 has some issues. I’ve added an issue and will see if I can replicate this problem. Also please see https://.com//leap-ue4#engine-plugin-vive-fix to ensure that your offset is correctly setup, your hands may simply be way above you :p.

haven’t tried 4.13. will do that soon.

and yes, I did do the offset. still no hands. but i did at one point might have seen my hands at the origin in worldspace, but wasn’t sure if that was 4.14 or just something weird i did in 4.12 (at that point i just deleted the project and started over).