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 made the camera position 10 units from an object, but not behind it. I dont want the camera position behind the object right away when it rotates, I want that when I will rotate the object, the camera position will move slowly until it will be behind the object.

share|improve this question

Use a function that Interpolates between the two values such as MathHelper.Lerp or MathHelper.SmoothStep to smoothly rotate to the desired angle.

share|improve this answer
Are you looking from something along these lines? – ClassicThunder Feb 13 '12 at 17:14
but the camera is always behind the plane isnt it? – user1202920 Feb 13 '12 at 17:18
Directly no. The faster the plane is turning the more the camera will be offset from directly behind the plane and when it stops turning the camera will gradually return to directly behind it. – ClassicThunder Feb 13 '12 at 17:22
I didnt understand the Quaternion, what exactly is it, and what .Identity means? – user1202920 Feb 13 '12 at 17:44
Identity for Vectors, Matrices, and Quaternions is the value that causes nothing to happen if you multiply it (similar to the integer 1 EX: 4 * 1 is still 4). I'm not going to go into what a Quaternion is mathematically other than it is a powerful way to store rotational data. The Vector3.Transform bit is rotating the vector around the origin by the amount specified by the Quaternion. – ClassicThunder Feb 13 '12 at 18:26

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.