Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
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 (Ayumi, 1 invisible), 584 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
increase sensitivity #365571
03/27/11 16:12
03/27/11 16:12
Joined: Dec 2009
Posts: 361
R
rtsgamer706 Offline OP
Senior Member
rtsgamer706  Offline OP
Senior Member
R

Joined: Dec 2009
Posts: 361
I am making a first person game where you look around with the mouse.
Using the code below:
Quote:
mouse_pos.x = mouse_cursor.x;
mouse_pos.y = mouse_cursor.y;
camera.tilt += mouse_force.y;
camera.pan -= mouse_force.x;
my.pan -= mouse_force.x;

the only issue is that its kinda slow,
I have to life the mouse three times to make a full rotation.
Anyone know how to speed up the turning?
Thanks
Rstgamer706

Re: increase sensitivity [Re: rtsgamer706] #365573
03/27/11 16:19
03/27/11 16:19
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Multiply it with a constant or a variable.
Code:
var mouse_sensitivity = 2;
camera.tilt += mouse_force.y * mouse_sensitivity;
camera.pan -= mouse_force.x * mouse_sensitivity;
my.pan -= mouse_force.x * mouse_sensitivity;




Always learn from history, to be sure you make the same mistakes again...
Re: increase sensitivity [Re: Uhrwerk] #365632
03/28/11 01:09
03/28/11 01:09
Joined: Mar 2010
Posts: 20
K
KingdaKa Offline
Newbie
KingdaKa  Offline
Newbie
K

Joined: Mar 2010
Posts: 20
You should also multiply these values with "time_step" to make the sensitivity (speed) the same on different systems.

Re: increase sensitivity [Re: KingdaKa] #365633
03/28/11 01:37
03/28/11 01:37
Joined: Nov 2002
Posts: 913
Berlin, Germany
S
SchokoKeks Offline
User
SchokoKeks  Offline
User
S

Joined: Nov 2002
Posts: 913
Berlin, Germany
Originally Posted By: KingdaKa
You should also multiply these values with "time_step" to make the sensitivity (speed) the same on different systems.


This is something that should never be done!!

It will make your mouse-speed fps-dependent, meaning that with very low fps you can only turn the camera/player very very slow. If you don't belive me, try it out.

No game does this, and it's for a reason.

Re: increase sensitivity [Re: SchokoKeks] #365637
03/28/11 04:03
03/28/11 04:03
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
try using mickey.x and mickey.y

Re: increase sensitivity [Re: SchokoKeks] #365638
03/28/11 04:15
03/28/11 04:15
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline
Serious User
darkinferno  Offline
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
Originally Posted By: SchokoKeks
Originally Posted By: KingdaKa
You should also multiply these values with "time_step" to make the sensitivity (speed) the same on different systems.


This is something that should never be done!!

It will make your mouse-speed fps-dependent, meaning that with very low fps you can only turn the camera/player very very slow. If you don't belive me, try it out.

No game does this, and it's for a reason.


i believe this is true somewhat but in that case, are you saying you dont multiply your speeds by time_step ?

Re: increase sensitivity [Re: SchokoKeks] #365646
03/28/11 09:33
03/28/11 09:33
Joined: Mar 2010
Posts: 20
K
KingdaKa Offline
Newbie
KingdaKa  Offline
Newbie
K

Joined: Mar 2010
Posts: 20
Originally Posted By: SchokoKeks

This is something that should never be done!!

It will make your mouse-speed fps-dependent, meaning that with very low fps you can only turn the camera/player very very slow. If you don't belive me, try it out.

No game does this, and it's for a reason.


You're right, i thought it would be the same as with the player movement. Normally the time_step var makes things fps-independent, actually in this case its the opposite way around.

Re: increase sensitivity [Re: darkinferno] #365653
03/28/11 10:52
03/28/11 10:52
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
Originally Posted By: darkinferno
i believe this is true somewhat but in that case, are you saying you dont multiply your speeds by time_step ?

time_step should only be used when calculating processed data to determine the effect rate it has based on the processing speed, it should not be used with commands that are only requested such as input... if that makes sense

Re: increase sensitivity [Re: MrGuest] #365799
03/29/11 13:09
03/29/11 13:09
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline
Serious User
darkinferno  Offline
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
lol somewhat, i'll have to run some more tests with it, been having a few little issues on this 'framerate independent' topic


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