One other minor detail: I don’t think cursor_angle currently depends on which direction the cursor is moving. I think it would be most useful if it did. i.e. If the cursor is moving left to right the angle should be returned as it is. If the cursor is moving right to left the angle should be 180 plus the current angle.