Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (alibaba, vicknick), 1,379 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Where is the mouse wheel mapping? #372781
06/04/11 11:41
06/04/11 11:41
Joined: Apr 2007
Posts: 125
Brazil - São Paulo
Ericmor Offline OP
Member
Ericmor  Offline OP
Member

Joined: Apr 2007
Posts: 125
Brazil - São Paulo
Hi folks,
i´m rebuilding my starting camera code, but cannot find the key function calls for the mouse wheel nowhere in the manual!
Those are the key mappings for mouse i found:
Mouse left: on_mouse_left, mouse_left
Mouse middle: on_mouse_middle, mouse_middle
Mouse right: on_mouse_right, mouse_right
There´s a 'mickey.z' mentioned, but doesn´t seen to work... is the way i´m accessing the variable, peraphs?
Code:
...
  if(mickey.z>0){follow_cam_distance+=10*time_step;beep();}
  if(mickey.z<0){follow_cam_distance-=10*time_step;beep();}
...


If there´s any other way of accessing mouse wheel functions, i´d appreciate any help. Thanks in advance.

Re: Where is the mouse wheel mapping? [Re: Ericmor] #373219
06/08/11 14:32
06/08/11 14:32
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline

Programmer
Lukas  Offline

Programmer

Joined: May 2007
Posts: 2,043
Germany
mickey.z should be the number of notches you moved your mouse wheel in the last frame times 120.

This is how it should work:
follow_cam_distance+=some_factor*mickey.z;

And don't multiplicate it with time_step, because as it already measures the notches PER FRAME, it's already framerate independent. Multiplicating it with time_step only makes it framerate dependent again.

Re: Where is the mouse wheel mapping? [Re: Lukas] #373220
06/08/11 14:34
06/08/11 14:34
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England

Re: Where is the mouse wheel mapping? [Re: MrGuest] #373224
06/08/11 14:47
06/08/11 14:47
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
maybe you're not calling it in a while loop


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

Gamestudio download | chip programmers | 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