Reverse Gravity trouble

Discussion in 'Discussion and Q&A Archive' started by DeoxysKyogre, Jul 23, 2011.

Thread Status:
Not open for further replies.
  1. DeoxysKyogre

    DeoxysKyogre No idea what to put here .-. Member

    Joined:
    Jan 31, 2009
    Messages:
    298
    Hello, it's been a long time since I didn't make a question like this on the forums.


    Well, so I, was researching on the s1 source, and I tried to do reverse gravity. I managed to make it work, but there's a BIG problem: when Sonic hits the ceiling, (floor in this case) he goes crazy!


    If you have something or suggestions of what could fix this problem, I might as well thank you.


    If you have something to fix it, if you want, I'd be pleased to put it properly with your help. I've been trying everything I could with my skills, but seems they aren't good enough for this. Help would be appreciated.


    Thanks in advance.
     
  2. M3k

    M3k h4x Member

    Joined:
    Jul 28, 2008
    Messages:
    37
    What do you mean by crazy? Can you post some pics?


    Moar info please!
     
  3. DeoxysKyogre

    DeoxysKyogre No idea what to put here .-. Member

    Joined:
    Jan 31, 2009
    Messages:
    298
    Well, by crazy I mean that he hits the ceiling and he teleports to the top of the chunk. (Finds a floor)
     
  4. SuperEgg

    SuperEgg I'm a guy that knows that you know that I know Member

    Joined:
    Oct 17, 2009
    Messages:
    Location:
    THE BEST GOD DAMN STATE OF TEXAS
    Make sure the floor has the correct collision. Some, or in Sonic 1, do not have all blocks with collision set. So you may be getting wonky things.
     
  5. DeoxysKyogre

    DeoxysKyogre No idea what to put here .-. Member

    Joined:
    Jan 31, 2009
    Messages:
    298
    I'm using the original art, and I made COMPLETELY sure it was correct. It's a problem of the ceiling and not of the floor
     
  6. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    Which is exactly where you're going wrong, you need to treat the ceiling as a floor, and by that you'd need to alter Sonic's collision response, reflex and physics, simply reversing Sonic's falling direction isn't enough.


    Take a look at the following routines:


    Sonic_Floor


    Sonic_SlopeResist


    Sonic_AnglePos


    Sonic_SlopeRepel


    Sonic_RollRepel


    Sonic_SlopeRepel


    Sonic_Move (Angle section)


    ObjectFall


    Sonic_Jump


    Sonic_JumpAngle (For angle reversing when in air)


    Sonic_WalkVertL


    Sonic_WalkCeiling


    Sonic_WalkVertR


    loc_14630 (routine under the checks is basically "Sonic_WalkFloor" in essense)
     
  7. SpirituInsanum

    SpirituInsanum Well-Known Member Member

    Joined:
    Feb 11, 2010
    Messages:
    642
    I never tried this, but don't you also have to use only "all solid" collisions (along with what's been said before)? In S3K's Death Egg, everything is set to "all solid", there's probably a good reason.
     
  8. DeoxysKyogre

    DeoxysKyogre No idea what to put here .-. Member

    Joined:
    Jan 31, 2009
    Messages:
    298
    Thanks, people. I managed to do it. I've impressed myself, I didn't do this kind of stuff in my old days. Haha.


    Once again, thanks. I think this topic can be locked now because the issue is solved! :wub:
     
Thread Status:
Not open for further replies.