Ledge Grab: Difference between revisions

Jump to navigation Jump to search
m
Clarifying language
(Restructure and use more explicit wording)
m (Clarifying language)
Line 3: Line 3:
{{needs_image}}
{{needs_image}}


A '''ledge grab''' works as follows: While Mario's position is against a wall and falling with non-positive vertical speed, the game checks two conditions.
A '''ledge grab''' works as follows: While Mario's position is against a wall and he has a non-positive vertical speed, the game checks two conditions.


* There is a wall 30 units above Mario.
* There is a wall 30 units above Mario.
* There is no wall 150 units above him.
* There is no wall 150 units above him.


If both conditions pass, the game searches for a potential ledge grab. From Mario's position, it considers a point 60 units towards the wall and 160 units above. This point ends up being 10 units into the wall due to Mario's 50 unit radius. From that point, it searches top-down for the first floor hitbox. If a floor hitbox is found, Mario will ledge grab onto it.
If both conditions pass, the game searches for a potential ledge grab. From Mario's position, it considers a point 60 units in the direction perpendicular to the wall and 160 units above. This point ends up being 10 units into the wall due to Mario's 50 unit radius. From that point, it searches top-down for the first floor hitbox. If a floor hitbox is found, Mario will ledge grab onto it.


Given these conditions, a ledge grab normally raises Mario between 30 units (inclusive) and 150 units (exclusive). Note that despite the search point starting 160 units higher than Mario's position, only a 150 unit raise is ordinarily possible because there would otherwise be a wall at the point 150 units above Mario.
Given these conditions, a ledge grab normally raises Mario between 30 units (inclusive) and 150 units (exclusive). Note that despite the search point starting 160 units higher than Mario's position, only a 150 unit raise is ordinarily possible because there would otherwise be a wall at the point 150 units above Mario.
16

edits

Navigation menu