Jump to content

World Bounds Offset Doesn't Work


Recommended Posts

I am trying to get the world bounds to move in from the edges of the screen. Take this phaser example as a demo: http://phaser.io/examples/v2/p2-physics/collide-world-bounds#gv

If on line 27, you add the code 'game.world.setBounds(50, 50, 250, 250);' You will notice that the 250x and 250y has taken affect, however the offset x and y of 50 each hasn't. At least, not to the sprite. So the tilemap moves in 50 x and y as you would expect, however the sprite still collides with the old world bounds. Why is this happening?

Please let me know if I have not been clear enough and I will get some images or write a demo to show you :)

Thanks, Nick

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...