More general player direction function