Myo Unleashed is a new series focused on the awesome tools and bindings created by our developer community. If you want to be featured, let us know here or at email@example.com! Up this week with a guest post is Jan Kaniewski, the author of the Myo UE4 bindings.
Over the past year, I've been developing plugins to make VR input easier in UE4. The Myo armband is unique among them in that it's wireless and allows for full freedom of movement. It has been a perfect meld for my current project, a real bird flight VR experience called Skycall, which will have a Myo version available soontm.
What I'm here for though is to explain how you can get started building your own Myo-enabled Unreal Engine 4 game using my Myo plugin. Let's dive in!
First, ensure you're on UE4.7, and then get the latest Myo UE4 plugin at the GitHub repo master zip link. In Unreal, make a project based on the Rolling template and drag and drop the Binaries and Plugins folders from the Myo plugin into your project root.
Relaunch your project, after which the plugin will be automatically enabled.
The easiest way to use the plugin is to use Unreal Engine's input mapping (IM) system which we can use to bind actions using no code whatsoever. First we need a Myo Component attached to any blueprint which will be used in the map; the easiest place to put it is attached to your Pawn or Character. In this case we will attach it to the
PhysicsBallBp blueprint found in the template project.
Double click the blueprint to open it. Now click Add Component and add the
To receive Myo events we should also add the
MyoInterface. This will allow you to do more complicated interaction with multiple Myo armbands. You can just right click and type "Myo" to narrow the events to Myo-relevant ones. For input mapping these events aren't used, but both steps should always be completed or the plugin will warn you about it.
Now that our input mapping system is ready and it will receive all the Myo events from our last paired Myo armband, we can edit Input Mapping under Project settings.
And that's it! Hit play to control the ball with your arm's Pitch/Roll and do a Wave Out gesture to jump.
It's really that simple. Here's the whole process condensed into a 60 second video:
If you want to explore the plugin further and learn how to use blueprint events, raw EMG, multiple myos, calibrated inputs/etc see the documentation found at the GitHub repo. Future plans for the UE4 plugin involve joint prediction (estimating where your elbow is) and fully automatic mixed hardware inputs using a
BodyState plugin with rigged convenience characters. This would mean, for example, that you could mix it with a RealSense camera or a Leap Motion and get auto-calibrated Myo input which will take over when your hands move off the FOV of the tracking systems, giving you a full hand and arm tracking VR experience.
Questions? Comments? Let me know at the main forum thread, or in the comments below. Happy ball jumping!