Jump to content

Best way to scroll the stage?


flimshaw
 Share

Recommended Posts

Heya,

 

I'm working on a Box2D platform engine with Pixi as the renderer.  I'd like to have the stage follow the hero as he wanders around.  My first thought was just repositioning the PIXI.Stage element, but that didn't seem to have an effect.  I guess I could have an offset for every individual object, but seems like it would be cleaner to be able to move an entire viewport at once if that was possible.  What's the Right Way to do it?

 

Thanks!

-Charlie

Link to comment
Share on other sites

I have a Sprite whose Texture is data from a canvas. When using this method, only the part of the canvas that is initially visible is shown. How can I redraw the sprite/texture to reflect the movement?

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.

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

Loading...
 Share

  • Recently Browsing   0 members

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