Announcement

Collapse
No announcement yet.

[Plugin] Leap Motion - Event Driven

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

  • replied
    Originally posted by Spittygood View Post
    So I am stuck trying to figure out how to attach a collision box to the basic rigged character. I am trying to make it so I can swat physics actors (like a simple sphere) when using the leap hands, but it doesn't work. I tried the method of just placing in near the character model like how I saw this done on the unreal example video for a character punching a large sphere.

    My guess is that the way the leap hands are instanced doesn't allow this to work properly.

    I also looked at the skeletal set-up of the rigged character, but I don't see how components would be attached to that to create a collision volume.

    So to sum up....HELP! Any tutorials or a clear explanation on how to make this work would be appreciated!


    [ATTACH=CONFIG]35960[/ATTACH]
    I'm having the same problem, but with trigger boxes.

    I love this plugin; it is too cool for school. Excellent work, seriously. But my little program depends on trigger boxes. Any help would be so appreciated. Pls halp?

    Leave a comment:


  • replied
    Any help from the community on this one? Please?

    Leave a comment:


  • replied
    Interact with objects by collision sphere

    So I am stuck trying to figure out how to attach a collision box to the basic rigged character. I am trying to make it so I can swat physics actors (like a simple sphere) when using the leap hands, but it doesn't work. I tried the method of just placing in near the character model like how I saw this done on the unreal example video for a character punching a large sphere.

    My guess is that the way the leap hands are instanced doesn't allow this to work properly.

    I also looked at the skeletal set-up of the rigged character, but I don't see how components would be attached to that to create a collision volume.

    So to sum up....HELP! Any tutorials or a clear explanation on how to make this work would be appreciated!


    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	683.9 KB
ID:	1074875

    Leave a comment:


  • replied
    Hi getnamo,

    First, thanks so much for your great work on this plugin. It's a fantastic resource.

    Like devel.bmad I'm also seeing some strange behaviors in 4.7.4 and now 4.7.5 with your plugin, both on Windows and OS X. Currently on both platforms I'm using the Unreal source compiled via Visual Studio and XCode respectively.

    After creating a new project based on the Epic 3rd or 1st person default templates, if I follow your basic instructions (copy the Binaries and Plugins directories as is to the project root) and change the default pawn class to one of your LeapRigged ones, your yellow convenience mesh doesn't replace the standard blue Epic one. This same sequence used to work in 4.6 just fine and still does with my older 4.6 examples.

    Another telling difference in 4.7.N is that the resources for your examples no longer appear in the Content browser when I follow this setup path. If I manually copy your Blueprints, Character and Materials folder (from within your Plugins > LeapMotion > Content folder) into the project root > Content folder, then I can at least see your content in the Content browser. However this leads to double entries in the Game Mode > Player Controller Class drop down.

    Perhaps the default pathing for 4.7.N has changed, and your file structure no longer is recognized the same way?

    I'm finding that if I load up another map in either a default 1st or 3rd person Epic blueprint project (such as one of the starter content maps) THEN your plugin will override the default character.

    Any idea what's going on? It seems something has broken with either 4.7.4+ or with a compiled code base?

    Thanks!



    -------------------------------------
    Rob Hamilton
    https://ccrma.stanford.edu/~rob
    @robertkhamilton

    Leave a comment:


  • replied
    Ehi getnamo!! Amazing work, your plugin is absolutely great.
    A couple of strange issues on OS X and UE 4.7.4:
    1) Standalone game / Restarting UEEditor
    - I create a new first person project. Configure the leap plugin, select blueprint -> game mode -> pawn -> select pawn class -> leap rigged character.
    - Play in editor: I see the yellow hands and can use the leap controller.
    - Save everything.
    - Restart the editor: the pawn is reverted to the default blue FP character. Why?? I cannot seem to correctly save the game mode
    - Play standalone game: I see the default blue FP character and no leap. Is this normal?
    - Package standalone: I see the default blue FP character and no leap. (no error with the plugin, everything configured following your instructions)

    2) shoulder location
    When the hand is tracked, the shoulder always moves to the middle of the chest and in front of the character (see ss). Shall I configure some parameter?
    Click image for larger version

Name:	Screen Shot 2015-04-07 at 01.55.17.png
Views:	1
Size:	415.9 KB
ID:	1072067

    Leave a comment:


  • replied
    Originally posted by commedieu View Post
    Getnamo,

    Thank you so much for getting this together. I ordered a Leap due to your work. I have a question about general pipeline, is your plugin/workflow currently the more user friendly solution for blueprint based projects, than the 'official' plugin? I'm excited to start learning after my job is done, but I just wanted to know if its more worth it to follow this route, than trying to work with the official plugin, for now...?
    It depends largely on your use case.

    As it is the official plugin supports rigid body hands with collision out of the box. This makes it convenient to push physical boxes around and the such. You simply drop an special actor into the scene or a component onto a character to get these hands to play with. It's simple and if you only want that kind of functionality I recommend using the official plugin.

    If you want anything beyond that, the unofficial plugin currently has easier support for it. This includes gestures, pinching and grabbing, input mapping, getting raw images, VR mode tracking, interaction box, frame history, tool tracking etc. You can in theory access them in C++ with the official plugin, but if you want these exposed in blueprints you are largely recreating what this plugin does. It is built with an event-driven architecture which means you simply respond to the events that you're interested in. Below is a blueprint example of using the circle gesture to show a sphere the size of the circle you are making



    Note that only the bottom event is needed. The top image shows equivalency for casting generic gestures to sub-gestures. You can get access to these features by adding a leap controller component to any of your blueprints and adding the LeapEventInterface to receive the events.

    The unofficial plugin also provides a convenience rigged character (and now passthrough) that is built with VR in mind. It is the default UE4 character with loosely coupled animation blueprint, which means you can swap both the character and the animation to your own and still retain the leap hand overrides. These do not have collision enabled by default, but if you would like to add it, a simple way would be to add a collision asset for the character you wish to use (capsules for each finger/joint). Rigging also supports VR mode automatically so just entering VR mode (fullscreen by default) will make everything feel 1:1 expecting the leap mounted to your hmd, and exiting out will expect the leap in a 'on table' default mode.

    Either way both plugins are easy to use and will make getting a leap project working how you want it very easy. It would be reasonable to expect the official plugin to gain some of the missing functionality over time and some of the missing convenience setups are planned for the unofficial. Long-term I am planning to abstract hardware away from a VR skeleton, which would allow you to support various input methods without altering any game logic. I would personally try both and see which you feel works better for your use case.

    Also note that as it currently is you need to compile the engine from source to include the official plugin (but it should make its way into the 4.8 binary), whereas this plugin installation is dragging and dropping into your project.

    Hope this helps!

    Leave a comment:


  • replied
    Getnamo,

    Thank you so much for getting this together. I ordered a Leap due to your work. I have a question about general pipeline, is your plugin/workflow currently the more user friendly solution for blueprint based projects, than the 'official' plugin? I'm excited to start learning after my job is done, but I just wanted to know if its more worth it to follow this route, than trying to work with the official plugin, for now...?

    Leave a comment:


  • replied
    Originally posted by Rasa View Post
    Hi Getnamo,
    In Default third person, I have setup the Input setting for Moveforward and turn rate to Leap right Palm Pitch and Leap right Palm Yaw, so now in certain stage I have control the character in idle stage but it is difficult to become idle while giving gesture, Is there way to become character idle by leap geasture.

    I tried Disable and Enable Input but Disable works well after that Enable doesn't works, gestures doesn't detect.
    ...
    I recommend that you use the blueprint events instead of input mapping if you're doing anything more complicated than joystick-like input. You can however use a simple conditional such as the 'branch' node with a boolean that forwards the input to MoveForward/etc only when true. The boolean would then be set/switched on the input mapping events (grab and pinch) like you've shown in your attachment to give your desired effect.

    Originally posted by san View Post
    Pretty impressive you got this third party plugin working so well!
    I'm curious why there is are Windows and OSX versions of the plugin but none for Linux. Is it simply the lack of resources and/or exerience in that area or are there fundamental issues that need to be resolved?
    Lack of resources on my part. Keeping the mac compile in sync already eats up more of my time than I'd like, I welcome any pull requests if you can help in any way. Also note that you have the full source with the plugin, so if you're on linux you can compile the plugin yourself, it is likely you will need no code changes. If that's not an option I recommend asking for the official leap plugin to support linux as they should have the resources, especially as it will be included in future UE binaries.

    Originally posted by bwiklund View Post
    After creating a fresh project, dropping the folders in, and restarting unreal:

    When I click OK, it fails with:

    This on OSX 10.10.1, UE4.7.3, Leap SDK 2.2.3
    Mac binaries were still on the old 4.6 version, the plugin simply needed a recompile. While I was at it, I updated both the binaries and dlls to the latest SDK (2.2.4). Grab the latest update from the usual place

    Update to 0.9.2
    -Mac Binaries compiled for UE 4.7
    -Leap SDK, libs and dlls updated for SDK 2.2.4
    Last edited by getnamo; 03-25-2015, 09:12 PM.

    Leave a comment:


  • replied
    Hey JasonKoch-

    If you create a custom game mode (Content Browser -> Add New -> Blueprint Class -> Game Mode) you can set that game mode in the world settings. Once you've done that the extended options for the selected game mode will become editable and you can change the character pawn.

    Cheers

    Doug

    Leave a comment:


  • replied
    Hey guys.

    This may seem ridiculously retarded, but when I try and adjust the world settings game mode to set the character to LeapRiggedCharacter, the character tab is locked. I'm new to this editor, and I may be in the wrong place completely, but it seems to be the same as what the tutorial pic suggests. There is no direct information as to where to cange this and I don't know how to unlock the tabs. Can someone please be very specific as to where I should change the settings in the first step.

    Thanks guys.

    Leave a comment:


  • replied
    After creating a fresh project, dropping the folders in, and restarting unreal:

    The following modules are missing or built with a different engine version:

    UE4Editor-LeapMotion.dylib

    Would you like to rebuild them now?
    When I click OK, it fails with:

    LeapPassthroughTest could not be compiled. Try rebuilding from source manually.
    This on OSX 10.10.1, UE4.7.3, Leap SDK 2.2.3

    Leave a comment:


  • replied
    Hi Getnamo,
    In Default third person, I have setup the Input setting for Moveforward and turn rate to Leap right Palm Pitch and Leap right Palm Yaw, so now in certain stage I have control the character in idle stage but it is difficult to become idle while giving gesture, Is there way to become character idle by leap geasture.

    I tried Disable and Enable Input but Disable works well after that Enable doesn't works, gestures doesn't detect.


    Click image for larger version

Name:	Capture.JPG
Views:	1
Size:	29.5 KB
ID:	1071173
    Last edited by Rasa; 03-25-2015, 08:20 AM.

    Leave a comment:


  • replied
    Pretty impressive you got this third party plugin working so well!
    I'm curious why there is are Windows and OSX versions of the plugin but none for Linux. Is it simply the lack of resources and/or exerience in that area or are there fundamental issues that need to be resolved?

    Leave a comment:


  • replied
    Originally posted by knack View Post
    i see you fix the finger rotation problem. That nice.
    Yep the finger rotation problem was caused by using the bone direction vector which by itself doesn't have enough information to determine rotation properly (two vectors would be enough, or a rotation matrix). So I switched to using the basis matrix which the leap api provides for each bone, from which you can derive a UE rotator that behaves as expected. This problem was also present in the elbow rotation, which was fixed in the 0.9.1 update. I feel like playing with these plugins have really improved my understanding of vector and matrix math, gotta love it!

    Originally posted by knack View Post
    when i move the head with a hand in front i see the hand move slighty when must be stopped.

    official plug-in have same problem.
    I rely on the same tracking data that comes out of the leap, so it makes sense for us to have the same problem. I believe there is a slight lag between input, so if you move your head quickly it will take a little bit of time (much less than a second) for the hands to get fully in sync with the updated viewpoint.

    This is, I believe, a physical limitation of the current leap tracking method, as they need a few compute cycles to determine the hand position and posture. They are quick, but not oculus quick. You can maybe improve this with some motion prediction, but that would be a pretty tough project.

    Leave a comment:


  • replied
    i see you fix the finger rotation problem. That nice.

    when i move the head with a hand in front i see the hand move slighty when must be stopped.

    official plug-in have same problem.

    Leave a comment:

Working...
X