# Rotation versus transform.forward in Unity

I want my player to "face" the direction they're moving, or if not moving, face the last movement direction. There are two solutions I see most often, using rotation (usually Transform.LookAt) or a "forward" vector, transform.forward.

Is there a reason to use one or the other? What do I gain/lose by using one over the other?

For the time being I'm updating transform.forward with a normalized vector of my character movement, unless it's 0,0. That doesn't work 100% so I have some logic left, but I want to understand why this isn't done using rotation.

# Use Transform.LookAt()
Transform.LookAt() will be more reliable, as it should be able to handle a 0,0 vector more easily, just make sure to add the movement vector to the player position vector before passing it into LookAt() or your player will always look towards scene origin!
Perhaps you should use Quaternion.LookRotation, simply passing in your velocity vector as the “forward” argument, and then just assign that to transform.rotation. Slightly less maths involved overall, and at least for me it would be conceptually easier to parse. You don’t have to worry about offsetting to a point in space or anything.