How do I fix my tilemaps colissions?

0 favourites
  • 3 posts
  • in every game i make no matter how the colision poligons are it never works well, in plataformers the character counts like it's constantly swaping between jumping and not while in a tile, in a top down game the edges of the tiles are ignored like they don't exist and the characters traspass them, how do i fix this from once?

  • It can be that your character animations have different collision polygons, causing strange behavior.

    Try using a square invisible helper sprite as a base for collisions.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Without looking at your projects, we can't really tell you how to fix your issues. However, here are a couple things that are good practices that may at least get you a little closer:

    Platform - Check the animation origin point and make sure it is the same distance from the bottom collision boundary.

    Explanation - Your characters sprite will swap between a falling and standing animation repeatedly if the distance between the bottom of the sprite and it's origin are different on the 2 animations. I prefer to set my origin on platform characters at the base of the sprite and make sure the bottom of the sprites collision polygon is the bottom of the sprite.

    Top Down 1 - Don't use the move to behavior.

    Explanation - I wouldn't think this is what you are doing but I wanted to cover all the bases. Move to doesn't care about solid objects. It just moves to the given destination.

    Top Down 2 - Make sure your tile size matches the pathfinding grid size.

    Explanation - I can only assume in this situation that you are using something like the pathfinding behavior. This happens a lot using pathfinding for users who don't take the time to learn how the path algorithm works. If I'm wrong, you would have to post your project to be able to get help with this one. With the pathfinding, the system uses a grid to define impassible areas. The the size of the grid is stored in one of the pathfinding properties. If your tile size is 32 but your pathfinding grid is 20, the system may not calculate the path correctly. Your tilemap needs to have the same tile size as the grid size of the pathfinding behavior and it needs to have it's origin aligned with it as well (meaning the tilemap origin needs to be on a grid point with 0, 0 being the best origin). Take a look at this to get familiar with how the pathfinding grid works:

    construct.net/en/construct-2/manuals/construct-2/behavior-reference/pathfinding

    Again, to get help with a specific problem, it is best to post your project so others can see exactly what is going on. Without it, you may never get the answer you need.

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