Image Bound and rotation

Hi There,

Is there a way to update the image bounds after rotation?

Explain?

Hi @samme, When i am rotating an image to certain angle and trying to get it’s bounds, the values of sprite.getBounds() is not changing with rotation. here is the link for similar probelm but this is for Phaser CE

You have to call getBounds() each time.

@samme I did that but it’s not helping. I want the exact fit bounds of an image after the rotation, even in the example you shared bounds are extending after the rotation.

I don’t understand. Are you expecting the bounds to change after rotation or not?

image
@samme, I have shared an image. Here, the image is rotated but its bounds is not rotating. I want to rotate the bounds of the image as well, while the image is rotating. I hope you’ve got the problem.

it’ll work in case of square but if the image is rectangle then it won’t work. Thanks for replying though

@samme , that solves my problem. these methods gives corner coordinate of this Game Object, regardless of origin. Thankyou so much for your help. :smiley: