Original Post
🔒 Locked
Mouse Coordinates Off
Advertisement
Quote:
Original post by Antonym
I render an object at (10,7.5) and then if I click the point where that object was rendered and check the mouse coordinates it tells me they are (10, 7.0) y is off by .5. Any reason why the mouse coordinates would be off? I use c++ and direct3d in case it's relevant.
My first guess is that mouse coordinates work as Integer values , so your Y-value is rounded to an Integer.
Are you running in window mode or fullscreen? If its windowed mode, make sure your window is large enough to account for window borders, or scaling will occur and screen coordinates won't match. For example, if you're rendering to a 640x480 screen, and you create a 640x480 window, it won't be big enough as the window is measured from the outside and includes the window title and edges.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement