Hi,
I have a box of verts. The box has an angle.
I need to rotate the box so the vert on the corner of the box is closest to the mouse position.
This is because like photoshops image rotation gadgets, you click and select a corner of the box, then you move the mouse and that corner strives to get to your mouse position, thereby rotating the box.
Its a good user interface thing for my app I am developing.
Just grab a corner and drag to rotate the box. Hows it done only knowing the position of the vert and the angle of the box?
I just want to return a sane angle...
I have a box of verts. The box has an angle.
I need to rotate the box so the vert on the corner of the box is closest to the mouse position.
This is because like photoshops image rotation gadgets, you click and select a corner of the box, then you move the mouse and that corner strives to get to your mouse position, thereby rotating the box.
Its a good user interface thing for my app I am developing.
Just grab a corner and drag to rotate the box. Hows it done only knowing the position of the vert and the angle of the box?
I just want to return a sane angle...