Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,449 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Mouse Wrap? #317817
04/02/10 19:01
04/02/10 19:01
Joined: Apr 2010
Posts: 38
D
deianthropus Offline OP
Newbie
deianthropus  Offline OP
Newbie
D

Joined: Apr 2010
Posts: 38
Hello, I am relatively new to 3dGS but have experience in other languages. I have created a view system that rotates about an object based on the mouse x and y position, but now I want to make the mouse wrap so you can circle about the object continuously.

I have tried setting ( vec_set() ) mouse_pos and mouse_cursor individually and together, and it will set the value i need in each case, but the limit of motion still exists in the same direction as originally (if you are crossing the screen boundary going left, the mouse/cursor value will jump to the pixel value at the opposite end, but I cannot continue moving the mouse left).

What can I do? I am checking for mouse force

(if (mouse_pos.x == 0 && mouse_force.x <= -1) )

setting the value of a vector, and applying it to the mouse and cursor positions.

newmouse=vector(screen_width-1,mouse_pos.y,0);vec_set(mouse_pos,newmouse);

I have also tried vec_add, and it did not work. How can I wrap the mouse around the x axis?

Re: Mouse Wrap? [Re: deianthropus] #317920
04/03/10 16:59
04/03/10 16:59
Joined: Apr 2010
Posts: 38
D
deianthropus Offline OP
Newbie
deianthropus  Offline OP
Newbie
D

Joined: Apr 2010
Posts: 38
Figured it out, kinda. I worked around it, really, by creating a virtual_mouse vector that was not set by mouse_pos or mouse_cursor but had an arbitrary starting point (midscreen) and was altered by mickey virtual_mouse.x += mickey.x Simple, effective and kinda beautiful. Gotta love mickey.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1