bigfootea Posted March 5, 2014 Share Posted March 5, 2014 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 Quote Link to comment Share on other sites More sharing options...
Mat Groves Posted March 6, 2014 Share Posted March 6, 2014 This should work ok? If you could provide a snippet of the issue that would be ace! thanks! Quote Link to comment Share on other sites More sharing options...
enpu Posted March 6, 2014 Share Posted March 6, 2014 Works for me:sprite.scale.x = -1; // flip horizontal Quote Link to comment Share on other sites More sharing options...
Sebi Posted March 6, 2014 Share Posted March 6, 2014 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. Quote Link to comment Share on other sites More sharing options...
bigfootea Posted March 6, 2014 Author Share Posted March 6, 2014 My apologies, this turned out to be something embarrassingly stupid on my part. Inverting the scale does indeed flip the sprite as expected. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.