0
\$\begingroup\$

I want to pull a sprite from point A(vector2) to point B(vector2) in my Windows Phone XNA game. GestureType.HorizontalDrag moves it horizontally and GestureType.VerticalDrag moves it vertically, how can I move the sprite diagonally?

The player should be able to pull the sprite in every direction if he touches the sprite with his finger. The sprite can't be moved if the player's finger isn't on the sprite.

How can I do that? How can I move an object diagonally on Windows Phone?

\$\endgroup\$
1
  • \$\begingroup\$ diagonal=vertical+horizontal. \$\endgroup\$
    – Jemmy
    Dec 14, 2013 at 0:30

1 Answer 1

0
\$\begingroup\$

There is GestureType.FreeDrag that may do what you want (MSDN).

Otherwise, it may be worth implementing your own touch behaviour using TouchPanel.GetState()

\$\endgroup\$
1
  • \$\begingroup\$ Thanx. It works. \$\endgroup\$ Dec 14, 2013 at 12:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .