ok, so i want the tank to move around more realistically, so when its going up a hill it rotates to match the angle of the hill, i can do that but when it turns to its left and i move forward the whole thing flips over, any help?
loat ti = tx + dbSin(ta);
float tr = tz + dbCos(ta);
float th1 = dbGetTerrainGroundHeight(2,ti,tr);
//dbSetCameraToFollow(x,y,z, -a ,5,2,10,1);
dbPositionCamera(tx ,ty + 5,tz );
dbRotateCamera(-tb, ta - 180 ,tc );
dbMoveCamera(-10);
float tHeight = dbGetTerrainGroundHeight(2,tx,tz);
float tt = dbATANFULL(th1 - tHeight, 1);
dbPositionObject(6, tx, tHeight ,tz );
if(dbUpKey())
if(t > -90)
dbMoveObject(6,-.05);
if(dbUpKey)
if (t > 90)
dbMoveObject(6,-.05);
if(dbUpKey())
dbXRotateObject(6,-tt);
if(dbLeftKey())
dbTurnObjectLeft(6,5);
if(dbRightKey())
dbTurnObjectRight(6,5);
if (!dbUpKey())
dbSetObjectSpeed(6,0);
being a yoyoer has its ups and downs...