Collision problem

PiggyTheAstro

  • Posts: 21
I have a game with an actor that has animations for him moving to the right. and to the left. The left animation is the exact same except that it's mirrored horizontally. The collision boxes cant be in the same position in the left and right animations because the actor leans forward so the collision box in the chest of one animation is on the sword of the other. It's not a big deal but when the actor goes right and into the wall, the collision bounds stop him from going into the wall, but if I turn sharply then the collision box changes place and goes into the wall which makes the actor stuck. Is there a way to fix this?

colburt187

  • *
  • Posts: 2416
I cant think of an obvious fix to this unfortunately. Could maybe do something like have a wall collider collision box that is central and collides with tiles, then set the leaning forward collision box to not collide with tiles.

PiggyTheAstro

  • Posts: 21
UPDATE: this is happening because of simple physics, I cant use Box2D because then the game would crash from having too many tiles and I cant set the tiles to have simple physics through the tile API.

colburt187

  • *
  • Posts: 2416
Too many tiles, how big is your scene? I’ve never heard of that before.

PiggyTheAstro

  • Posts: 21
It's an open world(ish) roguelike, each floor is 500x500 and to make the procedural generation work the scene must be filled with tiles. Using tile API


colburt187

  • *
  • Posts: 2416
Can you show a screenshot of the issue?

PiggyTheAstro

  • Posts: 21
Of the game crashing or the actor passing through the tiles?

colburt187

  • *
  • Posts: 2416
Of the collision set up of the actor