ofzach Posted November 2, 2016 Share Posted November 2, 2016 Greetings, I am working on a project where I have a bunch of sprites that I'm manipulating the scale, rotation, anchor point and position of. I need to get their original center point (not their current pivot point) in global coordinates after these transformations and am a little lost with the best way to do that. I see worldTransform -- is that useful? If there's an example or short snippet it would be really helpful, even just an avenue to look down. thanks much! zach Quote Link to comment Share on other sites More sharing options...
xerver Posted November 3, 2016 Share Posted November 3, 2016 You can use getBounds to get the global bounding box and calculate the center of it. Quote Link to comment Share on other sites More sharing options...
themoonrat Posted November 3, 2016 Share Posted November 3, 2016 And to calculate the global position of child display objects, you can use let globalPos = displayObject.toGlobal( displayObject.position ); 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.