How do I make my hitboxes work?

0 favourites
  • 4 posts
From the Asset Store
_______ Huge collection of metal fixtures ________
  • these 2 objects should fit together fine but then when I play

    this happens

    They both have platform behaviour and solid behaviour

    ALSO

    Even if this did work (which it dont)

    this situation also doesnt work as it thinks its inside the purple solids

    Ive ran into this issue alot and never found a good solution, some suggested making the collision box a bit smaller but this also doesn't work as when I do it just glitches and teleports all over the place OR if smaller it just looks like they aren't connecting properly.

  • I believe directly adjacent bounding boxes are considered colliding/overlapping. Even if they weren't, rounding errors would ensure that exact fit shapes like this would never actually fit together.

    I've seen some solutions use tile movement, others disable solids/collisions (or adjust the bounding box to be smaller as you mentioned) and implement a snapping system. The platform behavior by itself will likely be insufficient to handle perfect fits like this.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What would you recommend other then platformer? Tile wouldn't work in this situation.

  • I imagine you would use a snapping system, when you got close enough, to manually position the object in and disable platforming. Or give yourself some wiggle room so the fit isn't so tight.

    I mean even in real life, if you had two shapes like that that were EXACTLY fitted, it would be hard to connect them. There's usually some wiggle room or flexibility, even if very little.

    It depends on what the goal is. Is it just an obstacle you'll pass by, or is it an object you want to "dock" or connect with?

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