Virtual Thumbsticks

Feb 10, 2012 at 4:09 AM

I was wondering how do I go by adding the virtual thumbsticks on WP7.

Coordinator
Feb 10, 2012 at 2:31 PM

I guess you'll find my latest blog entry very interesting :)

http://indiefreaks.com/2012/02/10/wp7-virtual-gamepad-usage/

Regards

Feb 10, 2012 at 5:05 PM

Awesome! It looks great! Can't wait to implement it into the game! :)

Feb 12, 2012 at 6:24 PM
Edited Feb 12, 2012 at 7:07 PM

When going off your blog on how to make the virtual gamepad I'm getting errors with TouchPanel as it states it doesn't exist in the current context. Here is one of the lines of code that gets the error:

playerInputOne.VirtualGamePadMapping.LeftStick = new TouchMap {Static = false, TouchArea= new Rectangle(0, 0, TouchPanel.DisplayWidth/2, TouchPanel.DisplayHeight)};
Also in the latest changeset AlwaysVisible hasn't been changed to SensibleVisibility as stated in the previous changeset.
Coordinator
Feb 13, 2012 at 10:11 AM

Hi Strikerx87,

In order to use touch input on your WP7 project, you need to add a reference to Microsoft.Xna.Framework.Input.Touch.dll otherwise you won't have access to the touch API classes such as TouchPanel.

I double checked for the latter issue and I can definitivelly see the SensibleVisibility property in there. Make sure you overwrote the entire files if copying into the same directory ;)

Regards