It seems that EZrotate has different parameters for the SDK/GDK version than it used in DBPRO and im having problems converting this code.
void calctilt(int id,float angle,float move){
if(move<=0.1) {move=.65;}
//Object Positioning
//---------------------------
float Xpos=dbObjectPositionX(id);
float Ypos=dbObjectPositionY(id);
float Zpos=dbObjectPositionZ(id);
//Point 1 = Tank location
float P1X =dbObjectPositionX(id);
float P1Y =dbObjectPositionY(id);
float P1Z =dbObjectPositionZ(id);
//Point 2 = Tank location +1Z
float P2X = dbObjectPositionX(id);
float P2Y = dbGetTerrainGroundHeight(1,Xpos,Zpos+move);
float P2Z = Zpos+move;
//`Point 2 = Tank location +1X
float P3X = dbObjectPositionX(id)+move;
float P3Y = dbGetTerrainGroundHeight(1,dbObjectPositionX(id)+move,Zpos);
float P3Z = Zpos;
//Use FIND NORMAL Feature to find the normal of the surface
//--------------------------------------------------------
EZro_FindNormal(P1X,P1Y,P1Z,P2X,P2Y,P2Z,P3X,P3Y,P3Z);
//Use Poly Align Feature to calculate angle
//-------------------------------------------
EZro_PolyAlign(angle,EZro_GetNormalX(),EZro_GetNormalY(),EZro_GetNormalZ());
//Rotate tank correctly
dbRotateObject(id,EZro_GetPolyAlignAngleX(),EZro_GetPolyAlignAngleY(),EZro_GetPolyAlignAngleZ());
}
Which simply places my tank object at the correct terrain angle.
The problem is the EZro_findnormal only has 3 parameters
EZro_PolyAlign,EZro_GetNormalX,EZro_GetNormalY,EZro_GetNormalZ,EZro_GetPolyAlignAngleX,EZro_GetPolyAlignAngleY,EZro_GetPolyAlignAngleZ functions do not exist
fubar