This project is read-only.

Virtual Thumbsticks

Feb 10, 2012 at 5:09 AM

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

Feb 10, 2012 at 3:31 PM

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


Feb 10, 2012 at 6:05 PM

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

Feb 12, 2012 at 7:24 PM
Edited Feb 12, 2012 at 8: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.
Feb 13, 2012 at 11: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 ;)