Gamestudio Links
Zorro Links
Newest Posts
Bug in train mode, or it seem to me
by mistery. 09/24/26 17:34
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 09/22/26 12:21
Capital slider is not saving in Z12
by Petra. 09/22/26 06:49
Parent/child object
by VoroneTZ. 09/22/26 05:52
Zorro tutorial ideas?
by AndrewAMD. 09/21/26 14:50
Trades during a running bar
by Martin_HH. 09/21/26 12:03
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 7,936 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Knull, Opus, Jubilee, lopezsergio07, mistery
19240 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