Flying: Difference between revisions

Jump to navigation Jump to search
typo + practical advice (double check this)
(cleanup)
(typo + practical advice (double check this))
 
(2 intermediate revisions by the same user not shown)
Line 12: Line 12:
|related=
|related=
}}
}}
Flying is an action that can occurs when Mario triple jumps or does a cannon shot while wearing the [[wing cap]].
Flying is an action that can occur when Mario triple jumps or does a cannon shot while wearing the [[wing cap]].
 
Fast downward movements followed by slow upward movements is generally better than flying in a straight line.
== Entering flying ==
== Entering flying ==
* [[Shot From Cannon|Cannon shot]]: when y vel < 0 (and Mario does not cancel) ('''Action argument: 0''')
* [[Shot From Cannon|Cannon shot]]: when y vel < 0 (and Mario does not cancel) ('''Action argument: 0''')
Line 63: Line 65:
# 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 110:
</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.
Line 214: Line 217:
#* In further contrast, holding less of the same direction changes the angle by 32 (yaw) or 64 (pitch)
#* In further contrast, holding less of the same direction changes the angle by 32 (yaw) or 64 (pitch)
#* In even furthest contrast, holding more of the same direction changes the angle by 16 (yaw) or 32 (pitch)
#* In even furthest contrast, holding more of the same direction changes the angle by 16 (yaw) or 32 (pitch)
#* So it might be faster to say, modify pitch:as such: -56 to -4 to 60 instead of -56 to 8 to 40. Notice the slightly under zero instead of slightly over zero.
#* So it might be faster to say, modify pitch as such: -56 to -4 to 60 instead of -56 to 8 to 40. Notice the slightly under zero instead of slightly over zero.


After that, update_flying_yaw does:
After that, update_flying_yaw does:
299

edits

Navigation menu