Flying: Difference between revisions

→‎update_flying: explain best flying
(cleanup)
(→‎update_flying: explain best flying)
 
Line 63: Line 63:
# Pitch affects forward velocity.
# Pitch affects forward velocity.
# Forward velocity becomes at least 0
# Forward velocity becomes at least 0
# Forward velocity affects pitch (see above table)
# Forward velocity affects pitch (see below table)
# Pitch velocity affects pitch.
# Pitch velocity affects pitch.
# Pitch is clamped to be inside [-0x2AAA, 0x2AAA]
# Pitch is clamped to be inside [-0x2AAA, 0x2AAA]
# x,y,z velocity is more or less directly exactly correspondent to forward velocity, pitch, and yaw.
# x,y,z velocity is more or less directly exactly trigonometrically correspondent to forward velocity, pitch, and yaw.
# xz sliding velocity updated to correspond
# xz sliding velocity updated to correspond
<syntaxhighlight lang="c">
<syntaxhighlight lang="c">
Line 108: Line 108:
</syntaxhighlight>
</syntaxhighlight>
'''Key takeaways''':
'''Key takeaways''':
* Pitch velocity ''additively'' affects forward velocity, but ''sin'' effects pitch. '''The most energy efficient flying is to fly a lot down, and then a little up''', as, for example, sin(-0.5) + sin(0.25) + sin(0.25) ≈ 0.0153823799048 (positive), while the totally additive effect is still 0 (actually -0.3 because of a flat -0.1 per trame)
* Pitching to move up happens faster with higher forward velocity.
* Pitching to move up happens faster with higher forward velocity.
** The difference between 4 and 5 speed, and 16 and 17 speed is especially large.
** The difference between 4 and 5 speed, and 16 and 17 speed is especially large.
246

edits