Skip to main content
Question

How do you get the width and height of a rotated node?

  • July 22, 2024
  • 1 reply
  • 40 views

Ty13
  • New Member
  • 1 reply

If the node isn’t rotated, than its pretty simple to do:
relative pos=child.absoluteBounds.pos-parent.absoluteBounds.pos
size=child.absoluteBounds.size

but if the node is rotated, than the absoluteBounds reflects the overall space it takes instead of the size of the node.

My trigonometry isn’t the best, but I don’t think that’s enough information to calculate the width and height of the node.

Is there anything we can do to derive this?

Alex145
  • September 18, 2024

I have the same question


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings