| We hope you enjoy your visit. You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you are already a member please log in to your account to access all of our features: |
- Pages:
- 1
- 2
| Mouse coordinates imprecise; very weird | |
|---|---|
| Tweet Topic Started: Oct 13 2008, 07:43 PM (296 Views) | |
| Eansis | Oct 13 2008, 07:43 PM Post #1 |
|
ghost
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Well, I have this code to set the mouse pos to smoothly reach the center. But it seems if the mouse is in the top or left half of the screen the mouse stops at pixel 719! Display_get_width() is equal to 720! Global.mouse_x/y I think is bugged or something. SetMousePos(display_get_width()/2+(global.mouse_x-display_get_width()/2)/2,display_get_height()/2+(global.mouse_y-display_get_height()/2)/2); When I simply set it to instantly move the mouse to display_get_width/height/2 there are no problems.
Edited by Eansis, Oct 13 2008, 07:44 PM.
|
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY
| |
![]() |
|
| skarik | Oct 14 2008, 12:52 AM Post #2 |
|
kitten eating scum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Um, what? U3d's thingy sets it to the center of the screen automatically unlike GM's. |
| Blog|EHS | |
![]() |
|
| ashrat3000 | Oct 14 2008, 12:54 AM Post #3 |
|
u3d raytracer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I bet it has something to do with your smoothing script. So yeah, it would help if you post it. |
|
그대를 사랑해 | |
![]() |
|
| Eansis | Oct 14 2008, 03:00 AM Post #4 |
|
ghost
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I bet it has something to do with you not reading my post. It would help if you read it. I Posted The Script. So what's this about U3d automatically setting the mouse to screen center? Edited by Eansis, Oct 14 2008, 03:02 AM.
|
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY
| |
![]() |
|
| skarik | Oct 14 2008, 03:04 AM Post #5 |
|
kitten eating scum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
...
I'll write you a code. Edited by skarik, Oct 14 2008, 03:04 AM.
|
| Blog|EHS | |
![]() |
|
| Eansis | Oct 14 2008, 03:06 AM Post #6 |
|
ghost
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Window_get_x is like the same function as display_mouse_get_x()? But it works with Ultimate3d? |
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY
| |
![]() |
|
| skarik | Oct 14 2008, 03:08 AM Post #7 |
|
kitten eating scum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Nice, I'm using this. Great idea man! |
| Blog|EHS | |
![]() |
|
| Eansis | Oct 14 2008, 03:10 AM Post #8 |
|
ghost
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Except it won't work. -__- Edited by Eansis, Oct 14 2008, 03:11 AM.
|
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY
| |
![]() |
|
| skarik | Oct 14 2008, 03:11 AM Post #9 |
|
kitten eating scum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Works great here.
Works good on all the screen sizes (yes I test quick.) Edited by skarik, Oct 14 2008, 03:12 AM.
|
| Blog|EHS | |
![]() |
|
| Eansis | Oct 14 2008, 03:13 AM Post #10 |
|
ghost
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Set the mouse coordinates as a variable and you'll see its 1 pixel lopsided. Edited by Eansis, Oct 14 2008, 03:13 AM.
|
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY
| |
![]() |
|
| Eansis | Oct 14 2008, 03:26 AM Post #11 |
|
ghost
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
And yeah using round is a cheap fix. Still wondering why the problem occurs, though. |
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY
| |
![]() |
|
| skarik | Oct 14 2008, 03:36 AM Post #12 |
|
kitten eating scum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Screen coordinates are only precise to the integer. XD |
| Blog|EHS | |
![]() |
|
| Eansis | Oct 14 2008, 03:43 AM Post #13 |
|
ghost
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
So the range -1 to 0 is imprecise? |
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY
| |
![]() |
|
| skarik | Oct 14 2008, 04:38 AM Post #14 |
|
kitten eating scum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Screen coordinates are only precise to the unsigned integer in the range of your hardware's specifications. XD
Edited by skarik, Oct 14 2008, 04:38 AM.
|
| Blog|EHS | |
![]() |
|
| Eansis | Oct 14 2008, 05:46 AM Post #15 |
|
ghost
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
oh. |
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY
| |
![]() |
|
| Go to Next Page | |
| « Previous Topic · Questions about Ultimate 3D · Next Topic » |
- Pages:
- 1
- 2





![]](http://z1.ifrm.com/static/1/pip_r.png)



2:47 AM Jul 11