@Chamillion: Well, I'm trying to do the same thing as you, cause I'm making a game based on Space Cowboy. But what happens to me is that when I turn my "plane" left or right, my camera stays behind it. But when I'm going up or down. My camera doesn't follow it but stays like horizontal. So is there a way to make my camera turn around the X axis when my plane is going up/down so that it stays behind it??
This is my code for moving the plane ( stil working on the turning left and right ):
void MoveAirplane ( void )
{
dbSetCameraToFollow(dbObjectPositionX(3), dbObjectPositionY(3), dbObjectPositionZ(3), dbObjectAngleY(3), 20, 5, 1, 0);
dbMoveObject ( 3, 1 );
if (dbKeyState (17) == 1) // W
{
float AngleX = dbWrapValue(dbObjectAngleX(3) - 1);
dbXRotateObject ( 3, AngleX );
}
if (dbKeyState (30) == 1) // A
{
float Angle = dbWrapValue(dbObjectAngleY(3) - 1);
dbRotateObject(3, dbObjectAngleX(3), Angle, dbObjectAngleZ(3));
}
if (dbKeyState (31) == 1) // S
{
float AngleX = dbWrapValue(dbObjectAngleX(3) + 1);
dbXRotateObject ( 3, AngleX );
}
if (dbKeyState (32) == 1) // D
{
float Angle = dbWrapValue(dbObjectAngleY(3) + 1);
dbRotateObject(3, dbObjectAngleX(3), Angle, dbObjectAngleZ(3));
}
}
And do you know why, when I make a model and load it in GDK, it seems rotated around its axises by 90 to 180 degrees?? For what I see as the back in GDK. I see as the top in blender.
Already thanks for reading this and maybe helping me.
Isocadia