Stack Overflow success!:

Stack Overflow proved to be an incredibly useful tool. The creator of the original controller (cabbibo) contacted me asking to see my working files. After sending over my progress with the update he managed to finish updating the controller for my project in no time at all. (https://github.com/openleap/Three.leapControls)

After all of this turmoil a kind stranger was able to save the day! With this new version of the controller integrated into my project and the options tweaked I now have fully working leapMotion controller for my project!

The final version of my controller essentially works by using the leap.frame to collect data each frame of the users hands location. There is a centre point in the middle of the leap frame, the controls simply take the distance between the centre point and the users hand (in any given direction, can be multiple) and multiplies that distance with the movemenSpeed variable set in the options. It also takes the Yaw value of the users hand to translate the rotation value in quaternions. My own attempt wasn’t to far off but my lack of knowledge with the syntax let me down majorly being my main problem. However once it’s in front of me it seems so simple.

The following code snippet is the main bit of magic from the controller, as described above:

Screen Shot 2014-05-21 at 03.01.58

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s