Camera Offset Difficulties
by Sean Dugan · in Torque Game Builder · 07/20/2007 (5:19 pm) · 1 replies
I've been having a few problems when attempting to adjust my camera view. In our platformer, we do not wish the player to see the black area outside of our level graphics, and so we need to adjust the camera offset in relation to the player to always cut these edges out, and at all other times be centered on the character. Yet, we have checked the logic in our code multiple times, and we always achieve strange results of the camera shooting up into the air. Are the units of the camera offset slightly different than that of Torque? When we adjust our numbers, dividing by 4, we achieve much more accurate results, though still slightly off. We have also assumed that the torque unit/pixel ratio is about 1/8, is this correct? We need to know that so that the camera center stays 300 pixels from the bottom of the level graphics, half of the 600 pixel height.
Is there perhaps some example somewhere that deals with what we are seeking to accomplish?
Is there perhaps some example somewhere that deals with what we are seeking to accomplish?
About the author
Torque Owner Sean Dugan