Bug c_updatehull ???

Posted By: Anonymous

Bug c_updatehull ??? - 09/12/15 22:31

The behavoir of c_updatehull and vec_for_min/max is different. I would think they would be the same. Is this a bug? Or a bug that wasn't fixed.

bug list
Quote:
The frame parameter of c_updatehull had no effect even with vertex animation (all A7 and A8 versions; fixed in 8.44).


Code
Code:
my.eflags |= NARROW | FAT;	
	wait(1);
c_updatehull(my,30);


Code:
my.eflags |= NARROW | FAT;	
	wait(1);
	my.frame=30;
vec_for_min(my.min_x, my);
vec_for_max(my.max_x, my);
vec_mul(my.min_x,my.scale_x);
vec_mul(my.max_x,my.scale_x);



Model form main folders template/models/sf_woman.mdl - No bones

Can you please view this?
Posted By: jcl

Re: Bug c_updatehull ??? - 09/14/15 07:46

I can confirm that c_updatehull and vec_for_min/max are definitely different functions (if that was your concern).

http://manual.3dgamestudio.net/ac_updatehull.htm

http://manual.3dgamestudio.net/vec_for_min.htm
Posted By: Reconnoiter

Re: Bug c_updatehull ??? - 09/14/15 09:36

Hi JCL,

c_updatehull is still buggy it seems. I tried it with gs3d tempate models like Malice did (template/models/sf_woman.mdl - No bones) and it doesn't do anything to the bounding box (viewing it from f11 window). Even after having set a wait and even after setting FAT and NARROW.
Posted By: jcl

Re: Bug c_updatehull ??? - 09/14/15 14:13

c_updatehull updates the collision hull. I don't think that it does something with min_x/max_x or FAT/NARROW. For setting min_x/max_x, as Malice has discovered, vec_for_min/vec_for_max can be used.

There are certainly tons of examples in past AUM issues and in the manual about collision settings.
Posted By: Anonymous

Re: Bug c_updatehull ??? - 09/14/15 16:11

Ok thanks.

c_updatehull does not set the bounding box to the actual frame..I see.
Quote:
Also sets the bounding box to the size of the collision hull

So I've been here long time, what is the difference between collision hull and bound box?

c_updatehull(my,1); // same effect as c_setminmax
c_setminmax(my); //same effect as c_updatehull
vec_formin/max. // Only one that actual sets the bounding box to "the real size of the model"
Posted By: jcl

Re: Bug c_updatehull ??? - 09/15/15 06:35

The collision hull is not the same as the bounding box. There are several different collision methods. Models have normally an ellipsoidal hull or a polygonal hull. The bounding box is around that shape and can be retrieved by vec_for_min/max. The min_x/max_x coordinates are external settings for restricting the collision range. You can see them by pressing F11 twice.

Look here: http://manual.3dgamestudio.net/collision.htm
Posted By: Reconnoiter

Re: Bug c_updatehull ??? - 09/15/15 10:11

Thanks JCL that was a helpfull description. Still c_updatehull should than update the bounding box too right? It would make sense I think for debugging/checking purposes.
Posted By: Superku

Re: Bug c_updatehull ??? - 09/15/15 12:54

There were some changes with c_updatehull and c_setminmax regarding min/max with the introduction of 7.82, see here:
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=303394#Post303394
Posted By: Anonymous

Re: Bug c_updatehull ??? - 09/15/15 16:57

Thanks jcl, I understand fully now.

This -is actual part of my lack of understanding. I had submitted a "blame the manual" post about not only correcting the chart but possibly about a rewrite of this section. It is one that has caused me the most trouble, from confusion.

Thank you for your time
Mal

Quote:
Still c_updatehull should than update the bounding box too right?


It does in fact do just that. If the collision hull is a shape around the player, the bounding box sets how far into that shape a penetration can happen. We c_updatehull is called, it creates the hull at largest needed size (at a frame), and set the bounding box at that size as well. So it's updating the bounding box to the max limits of the hull. Then using vec_for_min/max you can shrink the bounding box, allowing more penetration into the hull shape before a collision stop is triggered. Hull's would be something we do not see or really deal with at all. They are engine level items. The need for c_updatehull as a command, it would seem, exist only for the reason stated in the manual - So we can force a recalculation after make a deformation or other shape change to the model.

I hope I am both right and you understand now. c_updatehull sets the box to the max size of the hull every time. Not the real size of the player.
© 2024 lite-C Forums