OK I just need to know how can I limit my characters and camera rotation, so when I trun a 180 full trun, I don't see the characters back.
here is my code:
PostionCameraToObject:
void PositionCameraToObject::positionCameraToObject(int obj, int thirdPerson, int RotateX, int RotateY)
{
float fCameraAngleX = 0.0f;
float fCameraAngleY = 0.0f;
dbPositionCamera( dbObjectPositionX(50)-10,dbObjectPositionY(50)+60,dbObjectPositionZ(50)+10 );
dbYRotateCamera( dbCameraAngleY() + ( RotateX/10.0f ) );
dbXRotateCamera( dbCameraAngleX() + ( RotateY/10.0f ) );
}
and this is how i rotate my character:
int RotateX = dbMouseMoveX();
int RotateY = dbMouseMoveY();
dbPositionObject( 50,x,oldy,z );
dbYRotateObject( 50,dbObjectAngleY(50) + ( RotateX/10.0f ) );
dbXRotateObject( 50,dbObjectAngleX(50)+ ( RotateY/10.0f ) );