How do I fix this wierd gap when colliding something?

Not favoritedFavorited Favorited 0 favourites
  • 4 posts
From the Asset Store
Ride an endless hill on your skateboard, jump gaps and chase high scores.
  • Okay, so basically I'm making a platformer and I noticed that sometimes, when i collided with something, there was this gap between the player and the wall, and I think sometimes the player even sinks into the wall a little bit. Does anybody have a fix for this? It's really bugging me.

  • heres a video to help anyone out: youtu.be/wOM54fQDOSQ

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The platform behavior resolves collisions in such a way that there is a small gap sometimes.

    By zooming in on small objects the gap will be more noticeable. A workaround could be to scale all the object sizes up so the relative size of the gap is smaller to make it less notable. I’ve also seen people shrink the collision polygon slightly to hid the gap, but that could shift it visually overlapping slightly.

    Another option could be to make the platform movement yourself with events, and do a different strategy to not have the gaps. The behavior resolves collisions by repeatedly moving in steps till the object doesn’t overlap. With your own collision resolving events you could control the size of the steps to have a smaller gap. Or do a tiered approach by first resolving with bigger steps then a few more passes with smaller steps.

    Also depending on the shapes you collide with it may be possible to use the geometry itself and calculate the exact position that the objects precisely touch.

    Anyways, just some ideas you can do on your end. Filing an issue is also an option that may or may not result in an improvement in the behavior. But it would get the dev’s opinion.

  • heres a video to help anyone out: youtu.be/wOM54fQDOSQ

    Hi.

    You can save this test as a *.c3p file and upload it here.

    That way, we'll be able to take a closer look at how your collisions work.

    But in platformers, this collider is always hidden, and various animations are attached to it.

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