Tilted Inverted Pyramid Platform: Difference between revisions
No edit summary |
Jongyon7192p (talk | contribs) (fucking fuck (joke)) |
||
Line 20: | Line 20: | ||
}} | }} | ||
Tilted Inverted Pyramid Platforms are a type of platform object appearing in [[Lethal Lava Land]] and [[Bowser in The Fire Sea]]. The platform basically tilts and moves Mario with it. | Tilted Inverted Pyramid Platforms are a type of platform object appearing in [[Lethal Lava Land]] and [[Bowser in The Fire Sea]]. The platform basically tilts and moves Mario with it. | ||
==Behavior== | ==Behavior== | ||
The Tilting Inverted Pyramid creates a transformation matrix using its x,y,z coordinates and its x,y,z normal. The pyramid is initialized with x and z-normals of 0, and a y-normal of 1, so that the pyramid will always spawn in with its flat portion facing directly upwards. Once the pyramid is initialized, it behaves by calculating new normals when Mario is standing on it and then tilts and moves Mario with it. When Mario is on the platform, a matrix is formed from the difference between Mario’s x,y,z coordinates and the platforms x,y,z coordinates. This matrix is then multiplied by the transformation matrix to give a new matrix encoding Mario’s position before the platform rotates. The game calculates an approximate distance between Mario’s position and the platform’s position by the usual distance formula √(dx^2+dy^2+dz^2 ), where dx,dz represent the difference between Mario and the platform’s x and z coordinates, and dy is always assumed to be 500. The game then calculates new normal for the pyramid by scaling each factor dx,dy,dz by the approximate distance. Once the new target normals are calculated, the pyramid approaches these values by incrementing the current normal by .01 until they reach a final target normal. Every time the pyramids normals are updated, the platform’s orientation is updated to match. Finally, if Mario is on the pyramid, the game creates a new matrix encoding Mario’s expected new position on the platform and uses the difference between it and the previous position matrix to update Mario’s position. | The Tilting Inverted Pyramid creates a transformation matrix using its x,y,z coordinates and its x,y,z normal. The pyramid is initialized with x and z-normals of 0, and a y-normal of 1, so that the pyramid will always spawn in with its flat portion facing directly upwards. Once the pyramid is initialized, it behaves by calculating new normals when Mario is standing on it and then tilts and moves Mario with it. When Mario is on the platform, a matrix is formed from the difference between Mario’s x,y,z coordinates and the platforms x,y,z coordinates. This matrix is then multiplied by the transformation matrix to give a new matrix encoding Mario’s position before the platform rotates. The game calculates an approximate distance between Mario’s position and the platform’s position by the usual distance formula √(dx^2+dy^2+dz^2 ), where dx,dz represent the difference between Mario and the platform’s x and z coordinates, and dy is always assumed to be 500. The game then calculates new normal for the pyramid by scaling each factor dx,dy,dz by the approximate distance. Once the new target normals are calculated, the pyramid approaches these values by incrementing the current normal by .01 until they reach a final target normal. Every time the pyramids normals are updated, the platform’s orientation is updated to match. Finally, if Mario is on the pyramid, the game creates a new matrix encoding Mario’s expected new position on the platform and uses the difference between it and the previous position matrix to update Mario’s position. | ||
Except this isn't how it behaves. If it did, then Mario would always be displaced downwards, but sometimes he can be displaced upwards. The cause of this is either lost, unknown, or only known in the SM64 TAS discord. | |||
==References== | ==References== | ||
[[Category:Objects]] | [[Category:Objects]] | ||
{{objects}} | {{objects}} |
Revision as of 17:43, 22 November 2022
Tilting Inverted Pyramid Platform | |
Technical Constants | |
Object Group | Surface |
Tilted Inverted Pyramid Platforms are a type of platform object appearing in Lethal Lava Land and Bowser in The Fire Sea. The platform basically tilts and moves Mario with it.
Behavior
The Tilting Inverted Pyramid creates a transformation matrix using its x,y,z coordinates and its x,y,z normal. The pyramid is initialized with x and z-normals of 0, and a y-normal of 1, so that the pyramid will always spawn in with its flat portion facing directly upwards. Once the pyramid is initialized, it behaves by calculating new normals when Mario is standing on it and then tilts and moves Mario with it. When Mario is on the platform, a matrix is formed from the difference between Mario’s x,y,z coordinates and the platforms x,y,z coordinates. This matrix is then multiplied by the transformation matrix to give a new matrix encoding Mario’s position before the platform rotates. The game calculates an approximate distance between Mario’s position and the platform’s position by the usual distance formula √(dx^2+dy^2+dz^2 ), where dx,dz represent the difference between Mario and the platform’s x and z coordinates, and dy is always assumed to be 500. The game then calculates new normal for the pyramid by scaling each factor dx,dy,dz by the approximate distance. Once the new target normals are calculated, the pyramid approaches these values by incrementing the current normal by .01 until they reach a final target normal. Every time the pyramids normals are updated, the platform’s orientation is updated to match. Finally, if Mario is on the pyramid, the game creates a new matrix encoding Mario’s expected new position on the platform and uses the difference between it and the previous position matrix to update Mario’s position.
Except this isn't how it behaves. If it did, then Mario would always be displaced downwards, but sometimes he can be displaced upwards. The cause of this is either lost, unknown, or only known in the SM64 TAS discord.
References
|