How can I improve the handling. I would like it accelerates and brakes better.
Who can help me?
if (dbUpKey())
{
dbLoopObject ( 111,0 ,62 );
dbMoveObject(111,-geschw); //Auto bewegen
if (dbLeftKey()) {
dbYRotateObject(111,dbObjectAngleY(111) - lenkung);
dbYRotateObject(165,dbObjectAngleY(165) - lenkung);
dbLoopObject ( 111,0 ,62); } //Auto drehen }
if (dbRightKey()) {
dbYRotateObject(111,dbObjectAngleY(111) + lenkung);
dbYRotateObject(165,dbObjectAngleY(165) + lenkung);
dbLoopObject ( 111,0 ,62); }//Auto drehen }
} else {
dbStopObject(111);
}
if (dbDownKey())
{
dbMoveObject(111,0); //Auto rückwärts fahren
dbLoopObject ( 111,0 ,62);
if (dbLeftKey()) {
dbYRotateObject(111,dbObjectAngleY(111) + 1.0f);
dbYRotateObject(165,dbObjectAngleY(165) + 1.0f);
dbLoopObject ( 111,0 ,62);}//Auto drehen }
if (dbRightKey()) {
dbYRotateObject(111,dbObjectAngleY(111) - 1.0f);
dbYRotateObject(165,dbObjectAngleY(165) - 1.0f);
dbLoopObject ( 111,0 ,62);}//Auto drehen
}
float fHeight = dbGetTerrainGroundHeight ( 1, dbCameraPositionX ( ), dbCameraPositionZ ( ) );
dbSetCameraToFollow(dbObjectPositionX(111),dbObjectPositionY(111),dbObjectPositionZ(111),Angle,camdist, camhigh, camfade, 50);
/*====AUTO POSTITION====*/
fHeight = dbGetTerrainGroundHeight( 1, dbObjectPositionX (111), dbObjectPositionZ (111) );
posX = dbObjectPositionX(111);
posY = dbObjectPositionY(111);
posZ = dbObjectPositionZ(111);
dbPositionObject(111,posX,fHeight,posZ);
dbPositionObject(165,posX,fHeight,posZ);
/*=========================*/