Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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
add comment

1 Answer

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? riemers.net/eng/Tutorials/XNA/Csharp/Series2/Camera_delay.php –  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
show 4 more comments

Your Answer

 
discard

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.