camera tutorial
I want to make my camera rotate around an object that stays centered on the screen. the camera is supposed to always face the object hence viewing its shape from all sides while rotating.
I''ve gone through the camera turorials of gameprogramming.com, the one provided by NeHe (tutorial 10), and also the article on camera class on NeHe''s site, but I couldn''t quite figure out how to do it..i also looked the past posts on this forum but couldn''t gather much.
please someone tell me of some camera tutorial that demonstrates how to do a camera rotation around an object centered on the screen.
thanks a bunch.
www.gametutorials.com
They have a rotate around object tutorial.
Once you get the basics, you can make a better one then what they do.
They have a rotate around object tutorial.
Once you get the basics, you can make a better one then what they do.
No they dont have any tutorials that have a rotate around object.. or atleast i couldnt find any... they have five tutorials on camera and i''ve studied them in detail and experimented with but they dont have camera rotating around centered.
anyone any other places?
thanks.
anyone any other places?
thanks.
if you dont like looking through the source code on www.gametutorials.com (like i do) then learn some basic trigonometry. using sin, cos, and tan you can make the camera rotate and look at your object from any direction. just keep track of and adjust the distance between your camera and the object.
ok thanks... yes i got it in tutorial 4 on gametutorials... actually i had gone through and used those tutorials a while back, but back then i had skipped tutorial 4 coz i didnt need it... and i forgot that i had skipped it and thought that i''ve used all 5 of them
thanks.
thanks.
I am trying to rotate the camera around the object i am viewing, as demonstrated in the camera tutorial by gametutorials.com.
The problem is that instead of setting the up vector to be the (0, 1, 0) i have set it to be (-1, 0, 0) because thats how my object is seen the way i want it to be viewed. But as a result when i do rotation around the object, the object starts rotating around the camera instead.
my initial position and view vectors are: (center_of_object_X, center_of_object_Y, 6) and (center_of_object_X, center_of_object_Y, 0)
any pointers in this regards would really help.
thankyou.
The problem is that instead of setting the up vector to be the (0, 1, 0) i have set it to be (-1, 0, 0) because thats how my object is seen the way i want it to be viewed. But as a result when i do rotation around the object, the object starts rotating around the camera instead.
my initial position and view vectors are: (center_of_object_X, center_of_object_Y, 6) and (center_of_object_X, center_of_object_Y, 0)
any pointers in this regards would really help.
thankyou.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement