ok, so i am a complete begginner, i am trying to create a chase camera, and am having no luck. I am using the dbSetCameraToFollow command, but i do not like the way it follows
here is my code(sorry its messy....)
[ float a = 0.0f;
float x = 0.0f;
float y = 0.0f;
float z = 0.0f;
dbSyncOn ( );
dbSyncRate ( 60 );
dbSetCameraRange(1.0f,30000.0f);
dbLoadImage("texture.jpg",1);
dbLoadImage("detail.jpg",2);
dbSetupTerrain( );
dbMakeObjectTerrain(2);
dbSetTerrainHeightMap(2,"map.bmp");
dbSetTerrainLight(2,1.0f,-0.25f,0.0f,1.0f,1.0f,0.78f,0.5f);
dbSetTerrainTexture(2,1,2);
dbSetTerrainScale(2,.9,.1,.9);
dbBuildTerrain(2);
dbPositionObject(2,-10,-4,0);
dbLoadObject("skybox2.x",3);
dbSetObjectLight(3,0);
dbScaleObject(3,30000,30000,30000);
dbLoadObject("bike.x", 1);
dbPositionObject(1,0,-4,0);
dbPositionCamera(0,5,0);
dbTurnObjectLeft(1,220);
dbSetObjectSpeed (1,90);
int dbmakeVector3(1);
while ( LoopGDK ( ) )
{
x = dbObjectPositionX(1);
y = dbObjectPositionY(1);
z = dbObjectPositionZ(1);
a = dbObjectAngleY(1);
dbSetCameraToFollow(x,y,z, -a + 20 ,5,2,10,1);
float fHeight = dbGetTerrainGroundHeight(2,x,z);
dbPositionObject(1, x, fHeight, z);
if (dbUpKey())
dbLoopObject(1, 10);
dbSetObjectSpeed (1,90);
if(dbUpKey())
dbMoveObject(1,-.1);
if(dbLeftKey())
dbTurnObjectLeft(1,2);
if(dbRightKey())
dbTurnObjectRight(1,2);
if (!dbUpKey())
dbSetObjectSpeed(1,0);
if(dbDownKey())
dbSetObjectSpeed(1,0);
dbText(0,0,dbStr(x));
dbText(0,10,dbStr(y));
dbText(0,20,dbStr(z));
dbText(0,30,dbStr(a));
dbUpdateTerrain();
dbSync ( );]
any help?
being a yoyoer has its ups and downs...