Hi everybody!
i'm trying to rotate an object around the (world's) x-Axis and (the object's) z-axis.
the help said: use void dbXRotateObject ( int iObject, float fX )
sounds good...
to make my object turn around itself i found out that i can use turn, pitch and roll. tried all of them - roll seemed to be the right function for me.
i thought i could use just one first and afterwards the other one...
but it just doesnt work.
the moment i add dbXRotateObject - my object doesn't turn around itself any longer.
i don't understand why.
hope you can help me
here's my code:
for(int i=1;i<=n;i++){
//set active if picked
if(gems[i].id == obj){
gems[i].active = true;
}
//rotate
float f = 0;
if(gems[i].active){
f= dbObjectAngleX(gems[i].id)+2;
}
dbRollObjectRight(gems[i].id,3);
dbXRotateObject(gems[i].id,f);
}