How can I make the Camera move around my Object

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

Recommended Posts

Hi all, I have a problem, and I really don't know how to solve it. I'm using C++ to buil the Camera. I can make it move around the origin, but I don't know how to make it move around the object. I'm using D3DXMatrixRotationAxis but the problem is the vector used in this function. (0,1,0) ---> RotationY. I really don't get it. PlZ give me any advice.

PositionVector -= ViewVector;RotatedMatrix = MaxtrixRotation(x,y,z);PositionVector = RotatedMatrix * PositionVector;PositionVector += ViewVector;