How do I remove this gap with physics enabled?

0 favourites
  • 6 posts
From the Asset Store
Customize the animation of character when item changed
  • Hello,

    When I have physics enabled on the player and platforms, there is a little gap that appears between them.

    How do I fix this?

    Thanks

  • Go into the sprite and click the crop button - it has a 1px transparent border

  • Go into the sprite and click the crop button - it has a 1px transparent border

    Sorry for the late reply but I ignored the problem for the time being and recently came back to it.

    I cropped out the 1px transparent border but it didn't seem to change anything. It shouldn't have anyway considering the collision box was only on the white border of the square object (the player).

    This gap problem still happens only when I enable physics for the player. When its disabled with only "platformer" behaviour there is no visible gap. The gap disappears when the character is in motion but comes back when its still. This makes the character have a bobbing motion when it goes and stops.

    Any advice?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ah, enabling both physics and platformer behaviour for an object isn't a good idea, they simply don't play nicely together.

    Perhaps you could disable one behaviour and enable the other for split seconds during events? I tend to stay away from using them both together at all - what exactly are you trying to achieve?

  • One idea is to make the collision polygon slightly smaller in the image editor.

    The crop button adds a transparent line of pixels around the image. So that would create a gap if the colored pixels went to the edge of the image before.

    The physics engine also adds a small gap between objects called “slop” that increases stability. We don’t have access to tweak that though.

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