Add a LookScale weapon variable for view sensitivity

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Add a LookScale weapon variable for view sensitivity

Re: Add a LookScale weapon variable for view sensitivity

by Caligari87 » Tue Jul 23, 2019 7:23 am

Edited the wiki page, hopefully is clear enough.

8-)

Re: Add a LookScale weapon variable for view sensitivity

by Blue Shadow » Tue Jul 23, 2019 5:30 am

[wiki=Weapon_properties#Weapon.LookScale]It is on the wiki[/wiki], but lacks the actual documentation.

Re: Add a LookScale weapon variable for view sensitivity

by Marisa the Magician » Tue Jul 23, 2019 4:21 am

Oh, I guess it was undocumented, because I never noticed it being a thing.

Re: Add a LookScale weapon variable for view sensitivity

by Blue Shadow » Mon Jul 22, 2019 4:02 am

Yeah. It first made it into 4.0.0.

Re: Add a LookScale weapon variable for view sensitivity

by Graf Zahl » Mon Jul 22, 2019 3:55 am

This was added some 4 months ago, but this thread was forgotten.

Re: Add a LookScale weapon variable for view sensitivity

by Marisa the Magician » Mon Jul 22, 2019 3:54 am

Oh, finally. This is going to be quite useful for scopes / aiming down sights.

Re: Add a LookScale weapon variable for view sensitivity

by Blue Shadow » Mon Jul 22, 2019 3:26 am

Add a LookScale weapon variable for view sensitivity

by Caligari87 » Thu Mar 07, 2019 7:42 am

https://github.com/coelckers/gzdoom/pull/780

As it stands, adjusting the view sensitivity for a player can be done in a roundabout way by fiddling with a weapon's FOVScale and DesiredFOV to "trick" the engine into thinking the player has a higher or lower FOV than they actually do.

This pull request implements a canonical way to do the same without "hacks" by adding a simple multiplier LookScale to the weapon. For example, setting LookScale = 0.5 sets the player's look sensitivity to half.

Code: Select all

class PistolTest : Pistol {
	override void PostBeginPlay() {
		super.PostBeginPlay();
		LookScale = 0.1;    //10% look sensitivity
	}
}
8-)

Top