Hello! I'm designing a space shooter game, and I'm trying to position my camera behind the ship. Basically, wherever the ship is pointing, I need the camera to be in the opposite direction(+180 with a dbWrapValue, most likely.) and at a set distance. The distance is the Hypotenuse/Radius, and the angles are based off of the objects angles.
Any help?
Here's my progress.
//cameraXPos = 100 * dbCOS ( dbObjectAngleX ( 1000 ) * pi / 180 );
//cameraYPos = 100 * dbSIN ( dbObjectAngleY ( 1000 ) * pi / 180 );
//cameraZPos = 100 * dbCOS ( dbObjectAngleZ ( 1000 ) * pi );
//dbPositionCamera ( 10000, dbObjectPositionX ( 1000 ) + cameraXPos, dbObjectPositionY ( 1000 ) + cameraYPos, dbObjectPositionZ ( 1000 ) + cameraZPos );