For example, in a 2d world in the xy plane, I have a quad that represents the line AB. I would like to be able to rotate that quad about the z-axis at pivot point A or B so that it always points at position X (like a clock hand but the rotation pivots around a user specified end).
I have a solution for this but it varies depending on which end is selected to be the pivot.
Is there a more general solution?
Many thanks for any help.