Archived

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

yanuart

3rd person view problem

Recommended Posts

yanuart    162
Hi y''all ! I''m having some problem in implementing my 3rd person view camera system. What I want to do is to make my camerra always follows the character movement. To do this, I set my camera''s LookAtPt to the player''s position and the EyePt somewhere behind my character (something like a target camera system with the target locked, so any movement or rotation of the target also effects the camera, that way you can always see the back of your target) and then I construct my view matrix using D3DXLookAtLH().. The idea seems right, doesn''t it ?? Well, the problems occur when I combined my character with my 3d environment, especially during the rotation. I can rotate the character, which of course rotate the environment but I was expecting the character to stay put where he is, but it seems that my character having somekinda displacement in the environment caused by the rotation. Now, for a minute I thought that I was wrong about my character rotation, but if I lock the camera into a still place and then I rotate the character itself, it seems there''s nothing wrong with it, the data also seems right. Can somebody give me some hint on how to make a good camera system ?? especially 3rd person view

Share this post


Link to post
Share on other sites
amish1234    104
Make sure the center-of-rotation point is the same for the camera and player.

Proceeding on a brutal rampage is the obvious choice.

Share this post


Link to post
Share on other sites
HanSoL0    1210
I would actually use the inverse of the character''s matrix, and then move the cam backwards (-z) a certain distance. If you wanna make it look a little better, delay the camera a few frames by saving old copies of the matrix before applying them to the camera.


Ryan Buhr
Reactor Interactive, LLC.

Share this post


Link to post
Share on other sites