Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm making a 3D game in XNA4.0. How do I rotate a model to face the direction that the user is pressing. I assume I need to set its look at to the direction being pressed, but can't figure out how to do that.


share|improve this question
up vote 1 down vote accepted

You can get the world matrix with Matrix.CreateWorld(Position, Direction, Up);

Direction is the forward vector of your model...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.