Jump to content

Flipping sprites via negative scale


bigfootea
 Share

Recommended Posts

In a previous version of PIXI I could flip a sprite's texture orientation by setting sprite.scale.x to a negative value.

 

It appears with the latest version that no longer works.

 

Has this functionality been moved elsewhere?  Or was it just broken in the most recent release?

 

Thanks!

 

Darren

Link to comment
Share on other sites

I'm not sure if related but I remember having trouble flipping a sprite and setting the width/height some time ago.

Maybe that caused his problem.

 

e.g.

sprite.width = 100;

sprite.scale.x = -1;

 

Because the width and height is done via scaling and setting the scale at the same time can mess up. Unless that was fixed already.

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