moved rotate_to_coords function to Entity base class since it is probably pretty generic