Jump to content

Cycle map with panning

Artyom Trityak

Recommended Posts


I am trying to create something line world map which is a globe so edges are connected (ex from most left side you go to most right side).

This has has been split into small sprites each of them is individually interactable i.e clicks, hovers so i can not use TilingSprite because each small sprite should be interactive individually.


So the question is - is there any way to connect edges of the map so when used will do right panning, user will feel like infinity globe map.

Currently when user use panning i am changing container.x and container.y.

Link to comment
Share on other sites

Better to change container.pivot.x than container.x if you want camera-like behaviour.

For now you have to move your sprites to achieve that effect. When v4.1 will be more stable, you'll be able to use Cameras to achieve it: http://pixijs.github.io/examples/index.html?s=camera&f=mirror.js&title=%5Bv4.1%5D+2+bunnies+2+cameras&v=dev-4.1.0


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