• Create Account

#Actualneogeocg

Posted 30 October 2012 - 07:22 AM

First of all ,Thank you for your replies.

I think I have made a mistake in describing my problem.Actually I am implementing a chase camera.I have two classes,the camera class and the object class(the 3D object the camera is chasing). Initially the camera is behind the object as some predefined offset.Now as I rotate the object its forward vector rotates along y-axis.In the camera class I have a camera position and a camera offset.The camera position is determined as "camera position=object position+camera offset".Now in order to keep the camera always behind the object I want to rotate the offset so that its parallel to object forward and then to get the new position of the camera I use the above equation(with the new transformed offset).What I need is a way or built in function that rotates the offset to object's forward every time I rotate my object.Thank you

My vector math has become a little rusty over the years of "no practice".So plz bear with me:).Thank You for your help

#1neogeocg

Posted 30 October 2012 - 07:09 AM

Thank you for your replies.Let me be clear about my context.Actually I am implementing a chase camera.Now I have two classes,the camera class and the object class(the 3D object the camera is chasing). Initially the camera is behind the object as some predefined offset.Now as I rotate the object its forward vector rotates along y-axis,therefore the forward vector of camera should also rotate so that the camera is always behind the object.To do that I am passing the forward vector of object to camera's update method where I am doing all the camera math. Now I want a way or a built in function that transforms the camera forward vector to point in the same direction as the object forward vector.

My vector math has become a little rusty because its been a long time I have come accross these topics.So plz bear with me:).Thank You for your help

PARTNERS