Magia Posted August 11, 2019 Share Posted August 11, 2019 Hi all I use Pixi text with padding in style, and I noticed one thing const textSample = new PIXI.Text("text", { fontFamily: 'Montserrat', fontSize: 50, padding: 50, fill: mainRed, }); width of the text does't include padding, that's why I should do somthing like this for alignment text in container and it looks like this container.pivot.x = container.width / 2 - 50; container.pivot.y = container.height / 2 - 50; Does someone know how to align it properly? because I think it's not the best solution Quote Link to comment Share on other sites More sharing options...
themoonrat Posted August 12, 2019 Share Posted August 12, 2019 If you want to left align it, set anchor.x to 0 instead of messing with pivot. 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.