Using a Nerf Gun and Kinect to Play House of the Dead
by tonyblanch in Outside > Launchers
11193 Views, 24 Favorites, 0 Comments
Using a Nerf Gun and Kinect to Play House of the Dead
This is a quick and simple mod to combine a Kinect sensor and a modded Nerf gun for playing 'rail' shooter games like House Of The Dead 3 on your Windows 7 PC. For this set-up I am using a Nerf Finder EX-10 foam dart gun, a 5 button wireless mouse (this will be dismantled for parts) and a PC enabled Kinect sensor.
Connecting the Kinect Sensor to Your PC
The first step is to connect a Kinect sensor to your PC and install a collection of tools, which will enable you to control the Windows mouse pointer by moving your hand in-front of the sensor. The following link contains instructions on installing the open source Windows Kinect drivers, middleware and the FAAST mouse control toolkit: http://projects.ict.usc.edu/mxr/faast/ .
Configuring the Tracking Software
I use the following FAAST bindings for my 'rail' shooter set-up (these are for FAAST 0.07). This will enable the Kinect to move the mouse pointer around the screen according to how you move the Nerf gun.
[Sensor]
sensor_resolution 0
mirror_mode 0
smoothing_factor 0.12
skeleton_mode 3
focus_gesture 1
[Mouse]
mouse_enabled 1
mouse_control 0
mouse_body_part 1
mouse_origin 0
mouse_left_bound 6
mouse_right_bound 14
mouse_bottom_bound 0
mouse_top_bound 28
mouse_forward_threshold 4
mouse_relative_speed 30
mouse_movement_threshold 2
mouse_multiple_monitors 0
[Actions]
# mappings from input events to output events
# format: event_name threshold output_type event
lean_left 20 key_hold a
lean_right 20 key_hold d
lean_forwards 15 key_hold w
lean_backwards 15 key_hold s
The Actions settings are not used in the 'rail' shooter set-up, they could be used for movement in an FPS game but I have not tested this.
These settings are designed for the Nerf gun to be tracked at shoulder height, in the right hand (standing about 5/6 feet from the Kinect). FAAST activates it's tracking when you press Connect, Start Emulation and then wave the Nerf gun in front of the Kinect until a white focus dot appears in the tracking image.
[Sensor]
sensor_resolution 0
mirror_mode 0
smoothing_factor 0.12
skeleton_mode 3
focus_gesture 1
[Mouse]
mouse_enabled 1
mouse_control 0
mouse_body_part 1
mouse_origin 0
mouse_left_bound 6
mouse_right_bound 14
mouse_bottom_bound 0
mouse_top_bound 28
mouse_forward_threshold 4
mouse_relative_speed 30
mouse_movement_threshold 2
mouse_multiple_monitors 0
[Actions]
# mappings from input events to output events
# format: event_name threshold output_type event
lean_left 20 key_hold a
lean_right 20 key_hold d
lean_forwards 15 key_hold w
lean_backwards 15 key_hold s
The Actions settings are not used in the 'rail' shooter set-up, they could be used for movement in an FPS game but I have not tested this.
These settings are designed for the Nerf gun to be tracked at shoulder height, in the right hand (standing about 5/6 feet from the Kinect). FAAST activates it's tracking when you press Connect, Start Emulation and then wave the Nerf gun in front of the Kinect until a white focus dot appears in the tracking image.
Adding a Wireless Trigger Button to the Nerf Gun
Using FAAST and the configuration settings provided, you should be able to move a cursor around the screen by pointing your Nerf gun at it. This will enable you to aim in the 'rail' shooter. The next step is to add a mechanism to the Nerf gun to enable it to activate a fire command within the game.
I have used a Nerf Finder EX-10 for this mod, as it contains a 2xAA battery pack (to power the wireless trigger mechanism and a trigger operated switch).
First I unscrewed the Nerf gun case and removed the spring loaded bolt. I then dismantled a 5 button wireless mouse, which contained a circuit board with jumper wires connected to the side mouse buttons. I fitted the circuit board into the Nerf gun to fit in the cavity which had held the spring bolt and wired the circuit power to the Nerf battery pack.
I then wired one of the side button's jumper wires to the Nerf's trigger operated switch. The final touches were to black out the mouse laser and side vents with insulation tape, since we are only using the circuit for a trigger button.
When connecting to the PC via the Nerf circuit board's wireless transmitter, I found the best results were achieved by connecting my normal PC USB mouse and the Nerf's USB wireless receiver through the same external USB hub. This seemed to eliminate contention between the two devices.
The finished build is shown here (I also added a 'safety' toggle switch to the circuit to save power).
I have used a Nerf Finder EX-10 for this mod, as it contains a 2xAA battery pack (to power the wireless trigger mechanism and a trigger operated switch).
First I unscrewed the Nerf gun case and removed the spring loaded bolt. I then dismantled a 5 button wireless mouse, which contained a circuit board with jumper wires connected to the side mouse buttons. I fitted the circuit board into the Nerf gun to fit in the cavity which had held the spring bolt and wired the circuit power to the Nerf battery pack.
I then wired one of the side button's jumper wires to the Nerf's trigger operated switch. The final touches were to black out the mouse laser and side vents with insulation tape, since we are only using the circuit for a trigger button.
When connecting to the PC via the Nerf circuit board's wireless transmitter, I found the best results were achieved by connecting my normal PC USB mouse and the Nerf's USB wireless receiver through the same external USB hub. This seemed to eliminate contention between the two devices.
The finished build is shown here (I also added a 'safety' toggle switch to the circuit to save power).
Tracking the Trigger Button With X-mouse
I am using this set-up on House Of The Dead 3 with the game's mouse control mode enabled. In this mode the fire command is activated by pressing your mouse left button. However we have used a mouse side button as our trigger mechanism, which will be recognized by Windows as mouse button 4 or 5.
To map the Nerf gun trigger to the left mouse button I have used the X-Mouse software (http://www.highrez.co.uk/downloads/XMouseButtonControl.htm ) and set mouse button 4 and 5 to activate the left mouse button.
To map the Nerf gun trigger to the left mouse button I have used the X-Mouse software (http://www.highrez.co.uk/downloads/XMouseButtonControl.htm ) and set mouse button 4 and 5 to activate the left mouse button.
Playing the Game
With FAAST and X-Mouse running in the background, I downloaded a demo of House Of The Dead 3 (http://www.fileplanet.com/152190/150000/fileinfo/The-House-of-The-Dead-III---Demo ) and started it in windowed mode (FAAST would not work if the game was played in full screen mode).
I found the ideal arrangement was to shrink and move the FAAST window so it sat next to the game window. I could then move my cursor onto FAAST to activate Connect and Start Emulation mode before swiping it over to the game to play. I still need to press my keyboard Enter key to start and pause the game but I may add a second button to the gun for this at a later date.
I found the ideal arrangement was to shrink and move the FAAST window so it sat next to the game window. I could then move my cursor onto FAAST to activate Connect and Start Emulation mode before swiping it over to the game to play. I still need to press my keyboard Enter key to start and pause the game but I may add a second button to the gun for this at a later date.