Skip to content

Tile colliders are not working #2352

Answered by eonarheim
pdrhlik asked this question in Q&A
Jun 16, 2022 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Hi @pdrhlik thanks for posting!

I did a little digging and it looks like EdgeCollider doesn't behave properly when included in the TileMap's CompositeCollider, but as a workaround a standalone actor with an edge collider seems to behave correctly.

var edge = new ex.Actor({
  pos: ex.vec(100, 200),
  collisionType: ex.CollisionType.Fixed
});

edge.collider.useEdgeCollider(ex.vec(0, 0), ex.vec(0, 100));
game.add(edge);

I've made a bug so we can get this fixed #2353, I suspect the offset isn't being calculated right. I'll have some time later to investigate more.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@pdrhlik
Comment options

@eonarheim
Comment options

@pdrhlik
Comment options

Answer selected by pdrhlik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants