Game Development Community

Controlling object and camera position on shape load in ShowTool

by Joe Bussell · in Technical Issues · 11/20/2007 (4:30 pm) · 0 replies

Greetings,
I am fighting my demo application too much. Certainly that must mean I am going about this wrong ;-) What I am attempting to do is to control the load view of an object when it is brought in. I have constructed an xml file that contains my main shape, the morph targets, the lighting values, and the camera position and rotation. I have had good success with setting the camera rotation on load, but I have an odd shifting that seems to occur. It appears that I have somehow changed the center point for rotating the orbit camera. Each time I load the file I get pushed farther and farther off of center.
Since I am modifying the demo application I am using the variables camPos, cameraMatrix, and camRot from the showTSShape.cc. My load method is calling a function that I defined on ShowTSShape for overwriting the contents of these variables.
Can anyone explain the proper usage for setting the center point for orbit, the orbit distance, and position?

Thanks!