Gamestudio Links
Zorro Links
Newest Posts
zorro 64bit command line support
by jcl. 04/20/24 08:52
StartWeek not working as it should
by jcl. 04/20/24 08:38
Data from CSV not parsed correctly
by jcl. 04/20/24 08:32
Zorro FIX plugin - Experimental
by jcl. 04/20/24 08:30
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (7th_zorro, Aku_Aku, henrybane, flink, 1 invisible), 712 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Bug c_updatehull ??? #454643
09/12/15 22:31
09/12/15 22:31

M
Malice
Unregistered
Malice
Unregistered
M



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?

Re: Bug c_updatehull ??? [Re: ] #454667
09/14/15 07:46
09/14/15 07:46
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
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

Re: Bug c_updatehull ??? [Re: jcl] #454669
09/14/15 09:36
09/14/15 09:36
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
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.

Re: Bug c_updatehull ??? [Re: Reconnoiter] #454674
09/14/15 14:13
09/14/15 14:13
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
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.

Re: Bug c_updatehull ??? [Re: jcl] #454682
09/14/15 16:11
09/14/15 16:11

M
Malice
Unregistered
Malice
Unregistered
M



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"

Last edited by Malice; 09/14/15 16:13.
Re: Bug c_updatehull ??? [Re: ] #454693
09/15/15 06:35
09/15/15 06:35
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
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

Re: Bug c_updatehull ??? [Re: jcl] #454698
09/15/15 10:11
09/15/15 10:11
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
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.

Re: Bug c_updatehull ??? [Re: Reconnoiter] #454702
09/15/15 12:54
09/15/15 12:54
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
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


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Bug c_updatehull ??? [Re: Superku] #454717
09/15/15 16:57
09/15/15 16:57

M
Malice
Unregistered
Malice
Unregistered
M



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.

Last edited by Malice; 09/15/15 17:09.

Moderated by  jcl, Nems, Spirit, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1