218
edits
SuperHamster (talk | contribs) m (Bolding title in lead, moving categories to bottom) |
SuperHamster (talk | contribs) (Reference to behavior file) |
||
Line 24: | Line 24: | ||
==Behavior== | ==Behavior== | ||
Every frame Sushi’s X-position is set to a value equal to the sum of the X-position of its home and 1700 times the Sine of its current angle. Its Z-position is set to a value equal to the sum of the Z-position of its home and the Cosine of its current angle. Sushi’s Y-position is set to the sum of the position of the water level at its current location, the Y-position of its home and 200 times the Sine of its current angle. This makes Sushi move in a circle of radius 1700 and oscillate up and down by 200 units. Sushi’s movement angle is set to the sum of its current angle and 90 degrees while its current angle is increased by .7 degrees. If the difference between Mario’s current Y-position and the water level at Sushi’s current position is greater than -500, and the difference between Sushi’s current Y-position and the water level at Sushi’s position is greater than -200, a trailing wave is spawned behind Sushi. Every 16 frames, Sushi plays a sound. | Every frame Sushi’s X-position is set to a value equal to the sum of the X-position of its home and 1700 times the Sine of its current angle. Its Z-position is set to a value equal to the sum of the Z-position of its home and the Cosine of its current angle. Sushi’s Y-position is set to the sum of the position of the water level at its current location, the Y-position of its home and 200 times the Sine of its current angle. This makes Sushi move in a circle of radius 1700 and oscillate up and down by 200 units. Sushi’s movement angle is set to the sum of its current angle and 90 degrees while its current angle is increased by .7 degrees. If the difference between Mario’s current Y-position and the water level at Sushi’s current position is greater than -500, and the difference between Sushi’s current Y-position and the water level at Sushi’s position is greater than -200, a trailing wave is spawned behind Sushi. Every 16 frames, Sushi plays a sound. | ||
==References== | |||
* [https://github.com/n64decomp/sm64/blob/master/src/game/behaviors/sushi.inc.c Sushi behavior file] | |||
{{objects}} | {{objects}} |
edits