Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 10/25/26 03:42
Chat Room for Zorro Programmers
by Haitao_Ren. 10/25/26 03:14
Trading Journey
by Haitao_Ren. 10/25/26 03:14
Algorithmic trading course with Zorro
by Haitao_Ren. 10/25/26 03:12
Zorro tutorial ideas?
by Haitao_Ren. 10/25/26 02:47
Zorro plugin for Hyperliquid.xyz
by mayarik. 10/24/26 09:14
Tradestation missing in table of contents
by AndrewAMD. 10/23/26 14:35
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (3run, TipmyPip, opm), 7,722 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Haitao_Ren, JimSimons, julienp, julienper, KelleyAbbey
19247 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 | 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