Physics vs Hitboxing: Round 1

This forum is currently in read-only mode.
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • Ok, so after reading a number of tutorials on platformers, I have found that there are tons of recommendations to use a separate hitbox for your hit detection. The game I am currently working on uses the physics behavior to do the math for elastic collisions. Is the use of a seperate hitbox recommended here? Thanks again for all you help everyone!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That all depends on what kind of game you're making, and what you need the hitbox to do, and what you need the player to do, etc.

  • Ok. I suppose this would be an appropriate time to ask what the real benefits of using a hit box are?

  • Okay... as I explained in the tutorial, the platform behavior will "push out" of solid objects when it's intersecting. That's just how it works. If your animation is uniform... no problem. But if your animation frames change size, as most do, then you could go from not intersecting on one frame to intersecting on the next frame, and viola... your character has magically teleported to the top of the wall. You need to keep the collision box uniform to avoid this. Using a separate object as the hitbox is currently the best method to do so.

    However, that's just a quirk of the Platform behavior, and just one of a few reasons why you might need to use a separate object.

    If you're doing something like a space shooter or whatever, you probably won't need to use a separate object at all. It depends on what the situation calls for.

    So... what's your situation?

  • Thank you very much! I was mostly wondering if there were other problems than what you mentioned in the tutorial, but as the physics property seems to take care of the issue you are mentioning here, I think I will be sticking with that. I use very few frames of animation with that as is.

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