My platform does not stop in solid

0 favourites
  • 3 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Hello!

    I have a platform sprite "Bob" and a sprite "Bar" that is solid and bullet.

    The bar spawns from the bottom of the layer and goes up, while Bob spawns from the top of the layer and falls.

    Bob has to "stop" in a bar and wait to an other one apears and then let him falls to the other bar.

    I have a little problem. When time pass, the bar gets faster, it means, it goes up faster. In a certain moment Bob stops to stop in the Bar. Why does this happen? Why a platform sprite can go thru solid?

    Im sorry for my english. I do what i can.

    Thank you for your help! This solution will help me to finish my game!!

  • If I understand the problem correctly, this seems to be typically what is referred to as "tunnelling", i.e. solid objects moving at relative high speed going through each other.

    This can happen if the size and speed of Bob and Bar, and the framerate, are in a configuration when at frame n Bob is totally above the bar, and at frame n+1 bob is totally below Bar ; in this situation, Bob and Bar are never really in collision, since they move too much in one single frame

    The usual solutions are time slicing (moving multiple times in smaller increments in one frame) and continuous collision detection (CCD, using swept volumes), though I'm not sure how you would solve this in C2...

    You might try using a bigger hitbox to detect possible tunnelling, and then the accurate hitbox, in case of possible condition

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you very much!!! Now im ussing a bigger hitbox in the Bar. And i also change solid behaviour for jumping thru. Now it works!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)