Code:
// Here the angles are read
ent_angles[ent_count][0] = str_to_float(str_value[0]);
ent_angles[ent_count][1] = str_to_float(str_value[1]);
ent_angles[ent_count][2] = str_to_float(str_value[2]);
// And here the entities angles is set
set_pev(ent, pev_angles, ent_angles[ent_count]);
This mins/maxs are correct for this angle: (0.0, 270.0, 0.0)
Code:
new Float:mins[3] = {-11.0, -2.0, 27.0};
new Float:maxs[3] = {11.0, 2.0, 71.0};
engfunc(EngFunc_SetSize, ent, mins, maxs);
ent_count++;
But if the angle is like this: (0.0, 90.0, 0.0) the mins/maxs are not correct.
I have no skills in 3D math so the only thing i could do is hardcode the mins/maxs for nearly every angle...*omg*
Does anyone know a function to calc the mins/maxs corresponding to the angles?
Thanks in advance
regalis
__________________