After model creation and rotation, i set c_setminmax(me);
Then, i use standard function
Code:
function draw_bbox(ENTITY* ent)
{
	VECTOR vMin, vMax;  
	while(1)
	{
		vec_set(vMin,ent.x);
		vec_add(vMin,ent.min_x);    
		vec_set(vMax,ent.x);
		vec_add(vMax,ent.max_x);    
		draw_box3d(vMin,vMax,vector(0,0,255),100);    
		wait(1); 
	}
}


i use it in
Code:
void InitMouseEvent()
{
	while(1) {
		if(mouse_ent) {				
			if(mouse_left == 1) {
				ent_morph(mouse_ent,sHandleModelName);
				draw_bbox(mouse_ent);
			}




Why its so different? debugging bounding boxes are more correct than draw_bbox(), but last one also use ent.min_x... so why this trouble can come?

Last edited by VeT; 03/11/09 16:44.

1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro