don't click here

Sonic Physics Guide

Discussion in 'Fangaming Discussion' started by Lapper, Apr 1, 2021.

  1. PsychoSk8r

    PsychoSk8r

    PsychedelAnt | Tone Turner Oldbie
    2,642
    57
    28
    Birmingham, UK
    30 Day Project: Revisited.A New Release!
    Left wall would be 270 degrees.
     
  2. Lapper

    Lapper

    Lappering Tech Member
    1,765
    956
    93
    England
    Sonic Studio, Sonic Physics Guide, Kyle & Lucy, Freedom Planet 2
    You don't need to do this!

    [​IMG] [​IMG]

    Tiles that are flat with no slope are typically "flagged" (more info), which means they essentially have no angle. In the case of Sonic (or any player character), the sensors that find this tile instead return the nearest 90 degrees to Sonic's current Ground Angle. This simple solution allows him to walk on all sides of them in any normal situation! Note: this obviously causes issues if the terrain is set up in ways that are unintended (example).

    Otherwise if the tile is not flagged, Sonic's Ground Angle is just set to the tile's angle no matter what mode he is in. There's no algorithm for changing the returned angle based on the current mode. A 45 degree slope is a 45 degree slope no matter what:) You also aren't supposed to be in situations where you are trying to walk on the sides or "back" of a sloped tile, so no need to worry about that either.

    The tiles' returned angle IS changed depending on how it's flipped, of course.
     
    Last edited: Mar 31, 2024
    • Informative Informative x 2
    • List
  3. Thank you very much Lapper!!
     
  4. Tsukiru

    Tsukiru

    Member
    5
    1
    3
    I was talking about days ago about the Insta-Shield and it came up that the Classics made Sonic invincible, but it's not mentioned in the Insta-Shield section proper. I check Mania's decompilation, and that game seems to set the player's invincibility to -8 and increments towards 0.