How do I fix this?

0 favourites
  • 5 posts
From the Asset Store
**** Fully animated eyeball enemy game sprite *****
  • Hello everyone!

    I'm having some problems with physics in my game, every time i use it in a object, the object start to "jump" a pixel, i'll attach a screenshot to make it easier to understand.

    Here the problem is with the chest, he have the physics behaviour, and hes not touching the ground. It's possible to fix it?

    PS: Sorry if i said something wrong, english is not even close to be my main language.

  • Look at the collision polygon of your chest and the floor where it stands. It is possible that the collision polygon is not exact and has a little space. Then your chest will 'hover' a little.

  • Thanks for the reply!

    I guess thats not the problem, because i use invisible boxes for collision, like this:

    BTW, i'm using the retro template, that could be a problem for the physics behaviour?

  • Without seeing your capx I can only guess. I still think it's a problem with the collision polygon.

    If your hitbox (invisible box) has the same size as your chest-sprite, take a closer look at you chest sprite with the image editor. Normally there is a padding around your sprite with a gap of 1 pixel. If your hitbox and the chest-sprite has the same size, your chest will about 1 pixel over the ground, because of the padding. Try to make your hitbox 2 pixel smaller in x and y, so the hitbox is 2 pixel smaller in each direction. Another problem could be the origin-point of your chest-sprite an the hitbox. If both points not exact in the middle you can also get problems.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you use collision hitboxes, then add a chest sprite, then set it's position to hitbox.x, hitbox.y+1 or more.

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