Jump to content
主视角中国

m_yaw & m_pitch !


Recommended Posts

Posted

给不知道此参数的人看!~

The easiest way to try and describe the effects of m_yaw and m_pitch is to use illustrations. Combining MSPaint with my (lack of) artistic talents doesnt lead to accurate, exacting illustrations but you'll get the idea. Remember, m_yaw effectively sets the "sensitivity" on the x-axis (horazontal) and m_pitch effectively sets the sensitivity on the y-axis. "Sensitivity" setting can be considered to multiply both settings equally. The diagrams use an oval to illustrate the area the mouse moves within for a limited mouse movement in every direction - maybe easiest to pretend the mousemat is a circle with two inch diameter. In effect, m_yaw sets the width of the oval, and m_pitch affects the height. "Sensitivity" just makes the circle bigger, but without changing the proportions.

With m_yaw set the same value as m_pitch, as default, the oval is a circle.

yaw_pitch_equal.jpg

If you set m_pitch proportionately low compared to m_yaw, the oval flattens into an ellipse. Note of course the exact same effect can be done by keeping m_pitch constant and making m_yaw proportionately high, the ellipse will have the same relative width to height, it will just be bigger - and you can make it smaller by reducing "sensitivity" setting. This is why both cvars are checked.

yaw_pitch_lowpitch.jpg

It is quite clear that if the enemy player is on level ground, it takes little effort to keep the crosshair at head height, and the player only has to worry about moving the mouse left or right in order to aim well. Of course, this makes it harder to adjust aim for players movements going up and down, but this is easier regardless of mouse settings anyway, you can see the terrain levels and predict height changes relatively easily, and on flat terrain the enemy can only either jump up or drop to a crouch or prone position - which is both slower and much less movement (i.e. much less angle change for aim, maybe +/- 45 degrees even at point-blank range, more like +/- 1 at long distance) than you can do by sprinting to the side (up to +/- 180 degree aim movement maybe necessary). A player would have to step off a small cliff for his head to change height suddenly and force a large down/up change in angle for aiming at him. A very low m_pitch:m_yaw setting, because of up/down aiming, can in some situations be a big disadvantage to the player, but in many others be a big advantage. To make it worse, it is possible to make a script to toggle the low ratio on and off when necessary. Clearly there is a need to restrict how much players can take advantage of this.

Whats seems to be the generally accepted allowance for this is roughly 2:3, i.e. m_pitch can be set to anything above two-thirds the sensitivity of m_yaw, or to relate to the diagrams, the height of the oval much be at least 2/3 of it's width. The picture shows this minimum requirement:

yaw_pitch_twothirds.jpg

In order to do this, there are two commonly used sets of cvar restrictions.

pb_sv_cvar m_pitch OUT -0.015 0.015

pb_sv_cvar m_yaw IN 0.022

or

pb_sv_cvar m_pitch OUT -0.015 0.015

pb_sv_cvar m_yaw IN -0.022 0.022

The first set results in an allowable range like the following image, players can set their yaw and pitch for an oval that lies anywhere between the red and pink ovals shown:

yaw_pitch_fixyaw.jpg

However, you'll notice this doesnt allow the maximum range of settings that we're not bothered about, so we're not being as flexible as we should. The second set of cvars are the same as the first set, except they allow the width of the ellipse to be reduced, at the given "sensitivity". In effect, this does not change what players can actually set their "ellipse" as, because the same range of ratio's of m_yaw:m_pitch can be used, it just allows for example 0.015:0.011 at "sensitivity" 10 instead of 0.030:0.022 at "sensitivity" 5 - it also allows negative m_yaw to be used for any player who might want his/her mouse inverted on the horazontal axis. It is simply a more flexible way to write the cvars that restrict what we want with minimal possible inconvenience for players.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

登录

Already have an account? Sign in here.

现在登录
×
×
  • 创建新的...