2 Replies - 1656 Views - Last Post: 10 October 2012 - 09:34 AM Rate Topic: -----

#1 paranoiks  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 10-October 12

Mouse position issue in XNA 4.0

Posted 10 October 2012 - 09:27 AM

I have the following problem in XNA:

When I set the mouse position to (0,0) it moves the cursor outside the game window.

When I get the mouse coordinates and move the cursor to the left corner (0,0) it shows me coordinates (170,0)

What can be the problem?
Is This A Good Question/Topic? 0
  • +

Replies To: Mouse position issue in XNA 4.0

#2 Ryano121  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1362
  • Posts: 3,002
  • Joined: 30-January 11

Re: Mouse position issue in XNA 4.0

Posted 10 October 2012 - 09:29 AM

Are you sure you're not setting it to (0,0) of your whole monitor and not just your window? If so you can use the window position to offset the values.
Was This Post Helpful? 0
  • +
  • -

#3 paranoiks  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 10-October 12

Re: Mouse position issue in XNA 4.0

Posted 10 October 2012 - 09:34 AM

I use Mouse.SetPosition(0,0);
It sets the position relative to the window. Also it doesn't place it in the top left corner of the screen, just somewhere outside the window
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1