How to find points on a rotated object

I want to find the corner of a square even when it’s rotated:
My Project6-18-2022_10-43-01.wick (2.0 KB)

I made this very quick, please try it… this will work for squares.


so, do I just type all that code in the square?

That is the explanation on how you will find the square’s corners in xy coordinates, based on square’s width and rotation. (pure trigonometry.)

does it work as code?

for sqrt use Math.sqrt
for ^ use Math.pow
for sin use Math.sin
for cos use Math.cos

Try it, and search in google for those Math functions if you don’t know how to use them.
sin and cos, they use angles in radians, you you will need to convert the angles.

What you want to do when you have the coordinates of the four corners?