Jump to content

Scale Layer -> Doesn't Scale Collision


Recommended Posts


In my current project I need to scale up all layers, but still keep the collision map correct.

Im using

myLayer.scale.setTo(4, 4);

to scale the layer and

map.setCollisionByExclusion([0], true, myLayers);

to set the Collision.


When I work with a scale of 1, 1 it works as it should, but when I scale up all layers, the Collision Map seems out of place. It's sill there, but it out of place.


Even in debug mode it looks like it works, but it still collides somewhere else:




I figured out that is it exactly on the same position as it would be with the scale 1:1.


Let me know if there's a solution for this problem!


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...