shabeerahmedshah Posted April 6, 2016 Share Posted April 6, 2016 Can we get the bounds of a rotated sprite into local word? Like converting the top right bounds of the rotated triangle (red circle) into global coordinates system. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted April 6, 2016 Share Posted April 6, 2016 PixiV4: When you call sprite.calculateVertices() it will fill an array with global coords, sprite.vertexData. https://github.com/pixijs/pixi.js/blob/dev/src/core/sprites/Sprite.js#L202 PixiV3: Copy the code from getBounds or try use code from V4. https://github.com/pixijs/pixi.js/blob/master/src/core/sprites/Sprite.js#L218 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.