Jump to content

[WIP] Leap Motion Plugin


nadvornm

Recommended Posts

Hi everyone!

It's finally there! Version 0.2 of my Leap Motion Plugin is online!

What it does?

You can control your rover and fly your plane with just moving your hand in front of your screen.

You can download my latest build here: https://www.dropbox.com/s/i4pzx0vury5ggiz/LeapMotionPlugin.zip (source code included)

Installation instruction:

Just unzip the file you downloaded into your KSP Main directory. As with any plugin it is best to use it in a fresh install.

How to control a rover:

Move hand towards the screen: forward

Move hand towards you: backward

Roll your hand to the left: steer left

Roll your hand to the right: steer right

Fist or hover over the controller: just roll / not throttle, drive straight

Move hand away from controller: brake

How to control a airplane:

The first hand you put over your leap motion controller is the steering hand. The second hand you put over your controller is the thrust hand.

With the steering hand you can control pitch, roll and yaw. Making a fist with the steering hand turns SAS on.

With the thrust hand you can control the thrust by moving your hand (spread your fingers) towards/away from your screen. Making a fist with the thrust hand halts the current thrust level.

Known issues:

-when the plugin is loaded thrust can only be controlled with your thrust hand. Shift and Ctrl Key don't have any effect on thrust anymore.

- the game crashes when exiting the game. Though while beeing in game everything works fine. I hope I can fix this soon.

- depending on your CPU specs it is possible you experience some small legs or micro lags

In case something is not working for please post it here and send me the ksp.log file

Planned for the next update(s):

- Activate action groups by using gestures

--Changelog 0.2--

-added airplane control

-plugin is now partless

-fixed stack overflow error

So have fun using your leap controller in KSP! Updates to this plugin will come soon

Edited by nadvornm
planned updates
Link to comment
Share on other sites

  • 2 months later...

Hey nadvornm,

a little feedback for your plugin.

Driving the rover with the above mentioned controls works as advertised except the steering control. I'm not able to turn the rover by rolling my hand instead the rover steers when I move my hand on the yaw-axis. I however find this behavior very convenient in regards of the flying controls.

Let's talk about flying :) It is great to control planes with your hand. This must be the feeling a Jedi has when using the force. Keeping in mind how the Leap recognises fingers I was getting used to the controls. I like the idea of using a steering and throttle hand, this kind of feels like I'm using a HOTAS. Although I'd call it HOLIA: Hands over Leap in Air. The steering is working as expected but the throttle could use some fine-tuning. I've placed my Leap over my keyboard, so I can press buttons without getting my second hand into it's range. I somehow have to put my hand very far forward to get 100% throttle and it's not using all the space to the back. Another thing is, that if I'm closing my hand too slow the throttle decrases like 1/3 which makes it nearly impossible to exactly set a specific value.

Tips for playing:

- Take care when driving rovers that can't handle a full brake. This is what happens if your Leap can't find any hands.

- Same goes for landing planes.

- When flying, always enter your hand into the Leap's sensor range as a fist and then open it to control steering or throttle because this will prevent unwanted changes.

- When controlling, make sure your Leap recognizes enough fingers, spreading your fingers is a good idea.

- When setting the throttle, keep your hand closed and put it into the desired position then open and close your hand for a short moment. Repeat until desired throttle is set.

Keep up your good work nadvornm, KSP is by far one of the best Leap games to play at the moment :) Also action groups would be really nice to fly SSTOs completly without interacting with the keyboard, I'd totally enjoy this feature :)

Link to comment
Share on other sites

  • 3 weeks later...
Hello there!

Has there been any more progress on this plugin?? I haven't fired it up yet but I'm just about to give it a whirl.

Hi retaliation,

I just recoded half the plugin yesterday to optimize the interface to the leap controller. My new code still needs some work and testing but you can expect a new update in the next few days. Feel free to test my plugin. It's always nice to get some feedback :)

Link to comment
Share on other sites

Hi retaliation,

I just recoded half the plugin yesterday to optimize the interface to the leap controller. My new code still needs some work and testing but you can expect a new update in the next few days. Feel free to test my plugin. It's always nice to get some feedback :)

Is there support for VAB? Or is that not in the works? That is the main use I'd have for it I think, being able to rotate the ship, inspect, and apply parts intuitively. My limited knowledge of Leap means I don't know if this will work but if it does I'd probably consider getting one.

Link to comment
Share on other sites

Is there support for VAB? Or is that not in the works? That is the main use I'd have for it I think, being able to rotate the ship, inspect, and apply parts intuitively. My limited knowledge of Leap means I don't know if this will work but if it does I'd probably consider getting one.

As you are already the second one I hear from that VAB control is wanted I will plan to implement it. However before starting to work on this feature I will have a look at docking control.

It would be nice if you could send me your ideas about the VAB control. So what you think which gestures and which intuitive hand movements will do what

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
Any update on vab control?

Hello BGog42,

As studying keeps me busy at the moment I didn't have much time to work on this project lately. However I might have some time when I get back home from 30C3 to finish the improvements I wrote about in my last post. Until end of frebruary I will have a lot of exames at my University so I might be able to start working on on VAB control as of March.

I'm sorry I can't develop faster. Altough any help would be very appreciated. So if there is a developer with a leap motion controller wanting to help me please just send me a message.

Edited by nadvornm
false quote answered. answer is for bgog42's question
Link to comment
Share on other sites

  • 9 months later...
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...