NUI Racing - Using Kinect (and C++) to drive TrackMania
- Posted: Aug 15, 2011 at 6:00 AM
- 7,057 Views
- 5 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Today's project does a couple things.
First, it's another C++ example. Secondly, it shows off using SendInput (.e. a lower level SendKeys) which I've seen a few posts on the Kinect Forums asking for. Thirdly, it's just kind of cool... ![]()
I love playing racing games.
I developed a program which you can use as game controller.
This program gets the coordinates of your l/r hand and l/r feet. It calculates by your hands a steering wheel and your feet the speed. If your right foot is at the ground you will give maximum of speed. When you lift it for some centimeters it will reduce speed or moving backwards.
After calculating the program send keys with SendInput() to the game and release them after a short time. This time will be calculated by using speed and direction. Maximum of time is 33ms (Because kinect has 30fps (1000ms / 30fps = 33ms per frame)).
Project Information URL: http://social.msdn.microsoft.com/Forums/en-US/kinectsdknuiapi/thread/4b2bac7b-32de-4ccd-b899-3c7a5a8bccb4
Project Source URL: https://rapidshare.com/files/99878144/kinecttracmania.zip
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?
I had attempted something similar about a year and half ago before Kinect and workable motion sensing libraries. I think I tried to do it in C# with TrackMania, however it didn't work because of C# SendKeys() not working properly with the game.
It gets plusses for the geek factor, but sometimes you really need to keep it simple... stearing wheel. Kinect looks epically unsuited for this particular purpose. Still, kudos for the effort.
"TrackMaina"? Shouldn't it be "TrackMania"?
@cbae: Why yes. Fixed.
C
@Charles:Thanks
Remove this comment
Remove this thread
close