Announcement

Collapse
No announcement yet.

[Plugin] Leap Motion - Event Driven

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Are the Motion Controller bindings up on github anywhere?

    Leave a comment:


  • replied
    Originally posted by bullale View Post
    Hey Getnamo,

    Today in the twitch stream Nick Whiting said that UE 4.9 will have a device-agnostic motion controller interface. Have you heard or seen anything about that? I'd like me PSMove plugin to implement that interface if possible.
    Had a chance to play with this Motion Controller binding last weekend when I was given an updated build for the HTCVive Jam in London.

    It is very applicable to hydra/psmove/touch/lighthouse or where you are tracking one point for each hand. For example for the jam I spent the first 30min porting over my hydra plugin, recompiling and simply updating the Motion Controller positions that I had attached to my blueprint when hydras were detected and moving. This allowed me to test my early builds completely using the hydras and then walk over to the limited Vive kits and it would work the very same, saving heaps of debugging time.

    I am curious how this can be done in C++ so that the blueprint adaptation I used won't be needed and importantly I don't believe it addresses more complicated inputs such as the leap motion or indirect positional input devices such as the Myo. There should me more thought on that and I should really get in touch with Nick Whiting on the subject. The jam was very informative and some of the things I learned will be used in future updates; e.g. pulling events from components similarly to how you do that for collision interaction, eliminating the requirement for setting an interface to your blueprint.

    Overall device agnostic binding is something I deeply believe in, but I think it needs to go one step further and abstract a whole body skeleton, which all input devices would fill. From there you would extract the information you want, with convenience components for most common configs. This way it would include input which doesn't fit into the two hand controller paradigm as well as full mo-cap suits.

    Leave a comment:


  • replied
    Hey Getnamo,

    Today in the twitch stream Nick Whiting said that UE 4.9 will have a device-agnostic motion controller interface. Have you heard or seen anything about that? I'd like me PSMove plugin to implement that interface if possible.

    Leave a comment:


  • replied
    Originally posted by selio View Post
    Working with This and VR and things are going mostly ok, but when I rotate my head, the rigged hands don't follow properly. I'm using a subclass of the LeapRiggedCharacter, only adding a material billboard to the blueprint. the debug hands remain properly placed, but as I turn my head, the rigged hands and debug hands come further and further apart, and stop following altogether after about 90 degrees of turning. When I return to a normal forward direction, the hands come back to match the debug position. What am I missing here?

    EDIT: Got some screenshots of the problem, presented below.

    ...
    This looks like you don't have the VRPlayerController set in your game mode.

    Originally posted by mindridellc View Post
    Hi there, I'm having trouble getting the debug sphere hands to appear in my project. My project is slightly different in that it's based off of the flying game template instead of the first person template. I don't know if this would effect my use of your plugin in any meaningful way, but it's the only way I can think of that differs significantly from the very detailed implementation instructions that you've provided. Maybe it's because my Pawn is based off of the Plane BP? I don't know. If I plug in your provided character controller and model instead of using my blueprint stuff, I can see my hands controlling the arms and hands of the provided orange model perfectly. But if I try to implement the debug hands myself, I don't see anything when I stick my hands out in front of the Leap.

    I've provided a screenshot of the section of my blueprint that deals with the Leap stuff. I'm using UE 4.7.6 and the version of your plugin that's recommended for it (0.9.2 I think?)....
    In your custom pawn did you add both a Leap Component and a Leap Event Interface? Without a component your events wont fire.

    Leave a comment:


  • replied
    Originally posted by mindridellc View Post
    Hi there, I'm having trouble getting the debug sphere hands to appear in my project. My project is slightly different in that it's based off of the flying game template instead of the first person template. I don't know if this would effect my use of your plugin in any meaningful way, but it's the only way I can think of that differs significantly from the very detailed implementation instructions that you've provided. Maybe it's because my Pawn is based off of the Plane BP? I don't know. If I plug in your provided character controller and model instead of using my blueprint stuff, I can see my hands controlling the arms and hands of the provided orange model perfectly. But if I try to implement the debug hands myself, I don't see anything when I stick my hands out in front of the Leap.

    I've provided a screenshot of the section of my blueprint that deals with the Leap stuff. I'm using UE 4.7.6 and the version of your plugin that's recommended for it (0.9.2 I think?).
    The blueprint looks right. Put in some break points and see if the blueprint interface events are even getting triggered. There's a chance (and its been my experience) that the events are being handled elsewhere and you'd have to create an event dispatcher which sends those events off to any subscribers. First things first though, figure out if the events are getting triggered and where they're getting triggered.

    Leave a comment:


  • replied
    Hi there, I'm having trouble getting the debug sphere hands to appear in my project. My project is slightly different in that it's based off of the flying game template instead of the first person template. I don't know if this would effect my use of your plugin in any meaningful way, but it's the only way I can think of that differs significantly from the very detailed implementation instructions that you've provided. Maybe it's because my Pawn is based off of the Plane BP? I don't know. If I plug in your provided character controller and model instead of using my blueprint stuff, I can see my hands controlling the arms and hands of the provided orange model perfectly. But if I try to implement the debug hands myself, I don't see anything when I stick my hands out in front of the Leap.

    I've provided a screenshot of the section of my blueprint that deals with the Leap stuff. I'm using UE 4.7.6 and the version of your plugin that's recommended for it (0.9.2 I think?).Click image for larger version

Name:	FlyingGameBlueprint.jpg
Views:	1
Size:	140.1 KB
ID:	1081451

    Leave a comment:


  • replied
    Originally posted by malcriado View Post
    So...leap motion in unreal continues to be a pain in the b*tt... When preview in vr, my character appears rotated 90 degrees from its head (hmd)...its been two years since leap motion came to the market and still no stable and solid develop for Unreal, and i dont want to do Unity pleaseeeee...any chance for a little bit of help?
    Thanks in advance!

    F.
    From what I can tell, that's not a "Leap Motion" problem -- it's a blueprint/content problem. Try rotating your character mesh by 90 degrees.

    All leap motion does is it detects your hand and joint positions. What I found to be super helpful is to enable debug drawing mode so that you can view each of these joints as the leap motion device sees them. It's also very helpful to switch between the infrared view and the game view to make sure that your hand positions are tracking with the bone positions (which means you'll have to make fine tuned adjustments to the LM offset values in the character blueprint). The community plugin tries to map the leap motion joint orientations to your characters joint orientations (in anim blueprint), so if your orientations are off by 90 degrees, you're going to get wonky behavior.

    I heard from an epic employee a few weeks ago that the sole guy who was working on the leap motion integration at Leap Motion is no longer working there, so their plugin support is kind of "on hold" at the moment. This community plugin is probably better. The unity team and leap motion teams have also spent a lot more time refining the drivers to work well with unity, so the performance issues and minor glitches we see in UE4 are mostly just a % market share and resource allocation problem.

    Anyways, I was able to get leap motion working with UE4. It wasn't easy, but I got it and I learned a lot in the process.

    Leave a comment:


  • replied
    Screenshot that shows what i posted before
    Click image for larger version

Name:	error.jpg
Views:	1
Size:	666.6 KB
ID:	1081156

    Leave a comment:


  • replied
    So...leap motion in unreal continues to be a pain in the b*tt... When preview in vr, my character appears rotated 90 degrees from its head (hmd)...its been two years since leap motion came to the market and still no stable and solid develop for Unreal, and i dont want to do Unity pleaseeeee...any chance for a little bit of help?
    Thanks in advance!

    F.

    Leave a comment:


  • replied
    Just tried with the basicRiggedCharacter and RiggedCharacter and both of them behave the same as my version.

    Leave a comment:


  • replied
    Originally posted by selio View Post
    Working with This and VR and things are going mostly ok, but when I rotate my head, the rigged hands don't follow properly. I'm using a subclass of the LeapRiggedCharacter, only adding a material billboard to the blueprint. the debug hands remain properly placed, but as I turn my head, the rigged hands and debug hands come further and further apart, and stop following altogether after about 90 degrees of turning. When I return to a normal forward direction, the hands come back to match the debug position. What am I missing here?

    EDIT: Got some screenshots of the problem, presented below.
    It looks like you're not accounting for the HMD orientation and offset correctly within your characters AnimBlueprint. I could be wrong, but that's my intuition. The shoulder or spine transform is not rotating with the head, so there's probably a transformation break in the AnimGraph.

    Does the out of the box version work perfectly? If so, does creating a character which inherits from the OOTB version break? If not, does adding a material billboard break it?

    Leave a comment:


  • replied
    Originally posted by Rasa View Post
    Hi Getnamo,

    How to use Is connected or Is services connected under Leap controller in BluePrint. I'm trying to check the connectivity of Leap Motion with PC in BluePrint....
    How its....????
    1. Make sure you character has "LeapAnimChildComponent", and get the child of that component and cast it to your "AnimBodyConnector" blueprint (or whatever you rename it to). Set this to a variable.
    2. Call "GetLeapController" on the "AnimBodyConnector" node. This gives you direct access to the leap controller. From here, you can access the "Frame" object for the leap.

    What I do is I run a polling service which records the last connection state for the leap each frame. I then compare this last connection state against the current connection state and I know that if they don't match, then the leap motion connection state has changed. Either it was reconnected or it lost connection (USB unplugged?). I fire off a dispatcher event which let's any subscribers know of these two events and they can handle it however they want.

    Here is my polling blueprint node:

    Click image for larger version

Name:	leapdemo.png
Views:	1
Size:	166.4 KB
ID:	1080976

    Leave a comment:


  • replied
    I moved my hands(or fingers) by a wide margin.However,the debug sphere only moves in a small range.What's the problem?
    I used the rigged character and the latest plugin.What's more,I do as the github guides.

    Leave a comment:


  • replied
    Originally posted by mankindforward View Post
    Yes, I'm doing this on two separate computers. Two of everything, connecting over LAN. Movements are replicated properly, meaning Player 1 can move and Player 2 sees the him move. I'll keep digging but it sounds like this *should* work. Have you tested this scenario yourself? Or anybody else tried this? Perhaps I'm missing some configuration.
    Did you ever figure this out. I'm seeing the same thing. Thanks.

    Leave a comment:


  • replied
    Hi Getnamo,

    How to use Is connected or Is services connected under Leap controller in BluePrint. I'm trying to check the connectivity of Leap Motion with PC in BluePrint....
    How its....????

    Leave a comment:

Working...
X