I'm new to dark gdk , and I have a question concerning modelmovement.
I've produced the following code
while ( LoopGDK ( ) )
{
// update the screen and move objects
if (dbKeyState(44) == 1) // s // move left
{
dbStopObject(1);
dbRotateObject(1,0,90,0);
dbLoopObject(1,6,33);
dbMoveObject(1,-2.0);
}
else if (dbKeyState(45) == 1) // move right
{
dbStopObject(1);
dbRotateObject(1, 0,-90,0);
dbPlayObject(1);
dbLoopObject(1,6,33);
dbMoveObject(1,-2.0);
// SC_UpdateObject(1);
}
else if( dbKeyState(46) == 1 )
{
// dbStopObject(1);
//dbRotateObject(1, 0, -90,0 );
dbRotateObject(1, 0,0, -90 );
dbPlayObject(1);
dbLoopObject(1,6, 33 );
dbMoveObject( 1, -2.0);
}
else if( dbKeyState(47) == 1 )
{
//dbStopObject(1);
dbRotateObject(1, 0, 0, 90 );
dbPlayObject(1, 6 , 33 );
dbMoveObject( 1, -2.0 );
}
dbSync ( );
}
// return back to windows
return;
After the necessary loading functions, it will load my animation correctly( a converted max file to .x), however the problems
begin to arise when I want to move the object in the opposite direction.
It almost feels like the animation has been moved out of position. And all I want it to do, is for it to go into
the opposite direction. What am I doing wrong or what kind of ( positioning ) command can I use to correct
this( behaviour ).