Surface: Difference between revisions

Jump to navigation Jump to search
1,586 bytes added ,  1 December 2018
wall hitbox stuff
m (Bad boot moved page Triangle to Surface over redirect: We do call it surface, both in decomp and in casual speech. Plus triangle is ambiguous)
(wall hitbox stuff)
Line 1: Line 1:
{{stub}}
{{stub}}
A '''surface''' or '''triangle''' in Super Mario 64 is a piece of geometry that exerts some kind of force or effect on Mario. Every triangle falls into one of three categories: a floor triangle, a wall triangle, or a ceiling triangle. However, a triangle does not store what category it is. Instead, its category is determined based on the y component of the triangle's [[wikipedia:normal vector|normal vector]]. If y component > 0.01, then it is a floor. If y component < -0.01, then it is a ceiling. Otherwise, it is a wall<ref>https://www.youtube.com/watch?v=UnU7DJXiMAQ</ref>.
A '''surface''' or '''triangle''' in Super Mario 64 is a piece of geometry that exerts some kind of force or effect on Mario. Every triangle falls into one of three categories: a floor triangle, a wall triangle, or a ceiling triangle. However, a triangle does not store what category it is. Instead, its category is determined based on the y component of the triangle's [[wikipedia:normal vector|normal vector]]<ref>https://www.youtube.com/watch?v=UnU7DJXiMAQ</ref>. If y component > 0.01, then it is a floor. If y component < -0.01, then it is a ceiling. Otherwise, it is a wall.
==Walls==
==Walls==
A triangle is a wall triangle if and only if -0.01 < normal.y < 0.01.
===Hitbox===
[[File:wall hitbox.png|300px|right|thumb|The hitbox of a wall during both the initial handle and a ground quarter step, simplified]][[File:wall hitbox air.png|300px|right|thumb|The hitbox of a wall during an air quarter step, simplified]][[File:wall hitbox water.png|300px|right|thumb|The hitbox of a wall in the water, including both the inital handle and the single frame movement, simplified]]
All wall hitboxes are handled once per [[frame]] and once per [[Quarter Step|quarter step]] of Mario's movement. Most of the time, a wall has two separate hitboxes handled one after the other within a frame or quarter step.
* A wall hitbox's initial frame handle has a hitbox extending 50 [[unit]]s forward and 50 units backward, offset down 60, and then a hitbox extending 24 units in each direction offset down 30.
* A quarter step of ground movement has a hitbox extending 24 [[unit]]s forward and 24 units backward, offset down 30, and then a hitbox extending 50 units in each direction offset down 60. This is the opposite order from the initial handle, but the outcome is the same.
* A quarter step of air movement gives the wall a hitbox of 50 units in each direction offset down 150, and then a hitbox of 50 units offset down 30.
* Water movement does not implement quarter steps. After one frame of water movement, a wall hitbox extends 110 units in each direction, offset down 10. Since both the water handle and the initial handle both happen once per frame, the hitboxes can be overlaid.
===Non-vertical walls===
[[File:Non-Vertical Wall.png|300px|right|thumb|This wall in [[BoB]] is not quite vertical.]] The majority of walls in the game are perfectly vertical, but not all. Walls that are not vertical are one cause of [[Glitchy Ledge Grab]]s.
[[File:Non-Vertical Wall.png|300px|right|thumb|This wall in [[BoB]] is not quite vertical.]] The majority of walls in the game are perfectly vertical, but not all. Walls that are not vertical are one cause of [[Glitchy Ledge Grab]]s.
'''hitbox stuff'''
==Floors==
==Floors==
==Ceilings==
==Ceilings==
==References==
==References==
<references />
<references />

Navigation menu