Gamestudio Links
Zorro Links
Newest Posts
Calculating with price series
by AndrewAMD. 10/21/19 14:31
Instrument Price Zorro Chart
by felixfx. 10/21/19 12:51
Error E355: Startup failure
by Dooley. 10/21/19 06:47
Today real live account blown - my experience
by Clifford_B. 10/19/19 17:09
Building Diversified Portfolios - New Paper
by SnoopySniff. 10/18/19 16:23
Indices & metals easier to trade than FX???
by SnoopySniff. 10/18/19 10:08
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
7 registered members (AndrewAMD, MatPed, Dico, Grat, Zheka, Dalla, 1 invisible), 642 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
VillageTalkies, line7, Shutch, Clifford_B, Paulius
18310 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: 700
Chicago, IL
Dooley Online OP
User
Dooley  Online OP
User

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

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

Joined: Jun 2007
Posts: 1,263
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: 700
Chicago, IL
Dooley Online OP
User
Dooley  Online OP
User

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

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

Joined: Jun 2007
Posts: 1,263
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: 700
Chicago, IL
Dooley Online OP
User
Dooley  Online OP
User

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