Gamestudio Links
Zorro Links
Newest Posts
Any Old Timers Still Around?
by pyramide. 08/24/19 18:23
Script filename
by MatPed. 08/24/19 17:18
Oanda FIFO issue?
by AndrewAMD. 08/24/19 12:10
IG plugin initial release
by Dalla. 08/24/19 06:06
Tutorial for Vector Graphics
by Dooley. 08/23/19 22:32
Issue with dataParse function
by byakuren81. 08/23/19 21:57
Multiplayer subscription
by Truth. 08/23/19 20:08
candle pattern on weekly bars
by AndrewAMD. 08/23/19 13:20
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
8 registered members (pyramide, 3run, AndrewAMD, MatPed, byakuren81, Realspawn, 2 invisible), 644 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Ysbail, trader4321, GorgonzolaBYTE, Southqvist, tawin
18272 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: 681
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 681
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: 681
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 681
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,237
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,237
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: 681
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 681
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: 681
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 681
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,237
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,237
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: 681
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 681
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