Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Quad, aliswee), 835 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Mouse Acceleration #477233
06/04/19 07:19
06/04/19 07:19
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 868
Chicago, IL
I am wondering if there is an existing script that handles how fast the mouse is moving to determine how fast the character/camera turns.

Here is my current script that handles character pan:

Code:
rotate_angle.x = -20*mouse_force.x*time_step*var_mouse_sensitive;	

c_rotate(my,rotate_angle,IGNORE_PASSABLE|IGNORE_FLAG2|GLIDE|USE_POLYGON);



In this case, var_mouse_sensitive is set to 0.5 by default.

Am I missing something important?

Some players feel like the faster you move the mouse, the slower the character pans...

Last edited by Dooley; 06/04/19 07:20.
Re: Mouse Acceleration [Re: Dooley] #477234
06/04/19 07:22
06/04/19 07:22
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 868
Chicago, IL
I looked into using mouse_pos and checking from one frame to the next how far the mouse had moved. This actually works, but once the mouse position reaches the edge of the screen, it no longer registers movement in that direction.

Re: Mouse Acceleration [Re: Dooley] #477236
06/04/19 13:17
06/04/19 13:17
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
Quote:
Am I missing something important?

mickey

Re: Mouse Acceleration [Re: txesmi] #477237
06/04/19 16:34
06/04/19 16:34
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 868
Chicago, IL
Ahhhh!

I knew about mickey. I just thought it was for the mouse wheel. Mind blown. Thank you again, stranger laugh

Re: Mouse Acceleration [Re: Dooley] #477238
06/04/19 16:47
06/04/19 16:47
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 868
Chicago, IL
In my defense, I search and read everything else related to "mouse" in the manual!

Re: Mouse Acceleration [Re: Dooley] #477239
06/04/19 18:58
06/04/19 18:58
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
laugh txesmi aka il brutto

Anyway, I am sure the example on that manual entry is wrong. It multiplies mickey by time_step when mickey is already a frame dependant variable. It is not the mouse speed but the moved pixels in the last frame. A FPS camera should add it raw and smooth the result a bit.

Re: Mouse Acceleration [Re: txesmi] #477240
06/04/19 21:25
06/04/19 21:25
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 868
Chicago, IL
Good advice! I will play around with it.


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