I have a problem when trying to Draws a correct 3D bounding box on 3D Entity with Roll, tilt and pan.

See picture for sample?
PIC 1 - Here I managed to correctly simulate the boundBox

http://uploaddeimagens.com.br/imagens/pic1-jpg--2

PIC 2 - In this second image, you can see that my function does not work when the object using Roll, Tilt and PAN
http://uploaddeimagens.com.br/imagens/pic2-jpg

My Script

Code:
VECTOR modelMin,modelMax;
while(1)
{
vec_set(modelMin,modelSelect.min_x);    
vec_rotate(modelMin,modelSelect.pan);			
vec_add(modelMin,modelSelect.x);		
			
vec_set(modelMax,modelSelect.max_x);
vec_rotate(modelMax,modelSelect.pan);
vec_add(modelMax,modelSelect.x);		
			
draw_box3d(modelMin,modelMax,vector(0,255,180),100);
wait(1);
}


Last edited by NeoNeper; 10/16/13 16:57.

Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________