Added rotationinv and fixed rotation controls

Should make rotation depend properly on position. Still not sure if
get_pos is correct.