Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Apouche

Camera

This topic is 5535 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I use Direct3D and, in fact here is what I want to do. I have a ship that moves in the 3D space and I want my Third person Camera to always follow it. How can I do that ? I use the D3DXLookAtLH function but it doesn''t really work because my camera don''t use with it. Furthermore, when for example my ship turn left (a Yaw angle not a Roll) I still want my camera to be behind it. Don''t forget that it is a third person camera so there is a distance separating the ship and the camera. Thanks...

Share this post


Link to post
Share on other sites
Advertisement
I've never actually implemented an 3rd-person camera myself, but if you want a really simple one, and if you have the direction vector of the ship, you could just set the camera position at the point vShipDirection * -X and and the the "look-at" point to vShipPosition where X is a number that suits your scale. If you want a smooth moving camera with interpolation and stuff I think you should look into quoternions. But as I've said, I've never implemented a 3rd-person camera myself.


____________________ ____ ___ __ _
Enselic's Corner - CodeSampler.com

[edited by - Enselic on April 29, 2003 6:09:35 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!