Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (AndrewAMD, TipmyPip), 16,005 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
bounding box resizing? #132304
05/27/07 11:48
05/27/07 11:48
Joined: Aug 2006
Posts: 128
Papua New Guinea
I
Impaler Offline OP
Member
Impaler  Offline OP
Member
I

Joined: Aug 2006
Posts: 128
Papua New Guinea
Hi, I am having some difficulty resizing the bounding box of the actors in my WWII FPS game. The box doesn't go all the way down to their feet, but stays above their waist, like this:
[image][/image] I've tried using c_setminmax and min_z/max_z but it doesn't change anything. The bullet's are using a c_trace function to hit the target, not a move function. How can I make the box extend all the way down to the feet?


Murphey's Law:
<< if anything can go wrong, it will >>

(Murphey was an optimist).
Re: bounding box resizing? [Re: Impaler] #132305
05/27/07 12:31
05/27/07 12:31
Joined: Aug 2005
Posts: 343
Germany
HPW Offline
Senior Member
HPW  Offline
Senior Member

Joined: Aug 2005
Posts: 343
Germany
You could try something like this...
Code:

var enable_polycollision = 2;

action my_npc {npc_update_collhull();}

function npc_update_collhull()
{
c_setminmax(me);

var v_highest = 0;
var v_lowest = 0;
var v_coll_size = 0;

v_highest = max(my.max_x, v_highest);
v_highest = max(my.max_y, v_highest);
v_lowest = min(my.min_x, v_lowest);
v_lowest = min(my.min_y, v_lowest);

v_coll_size = max(v_highest, v_coll_size);
v_coll_size = max(-v_lowest, v_coll_size);

vec_set(my.min_x, vector(-v_coll_size, -v_coll_size, my.min_z));
vec_set(my.max_x, vector(v_coll_size, v_coll_size, my.max_z));

return;
}




Evil Blood (v. 0.52) RPG
Commport.de (Social Network Community)
Re: bounding box resizing? [Re: HPW] #132306
05/27/07 13:07
05/27/07 13:07
Joined: Apr 2006
Posts: 329
M
molotov Offline
Senior Member
molotov  Offline
Senior Member
M

Joined: Apr 2006
Posts: 329
Maybe this works,

vec_for_min(my.min_x, my);
vec_for_max(my.max_x, my);

Have a nice day, Molotov.

Re: bounding box resizing? [Re: molotov] #132307
05/28/07 02:27
05/28/07 02:27
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline
User
JazzDude  Offline
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
Get the size you want--
head to foot, side to side,
in MED

Then use this code in the model's action:
Code:

vec_set(my.min_x, vector (-22,-22,-35)); //x,y,z minimums
vec_set(my.max_x, vector(44,44,35)); //x,y,z maximums
my.narrow = on;
my.fat = on;



According to the manual my.narrow and my.fat have to be there.

Re: bounding box resizing? [Re: JazzDude] #132308
05/28/07 11:40
05/28/07 11:40
Joined: Aug 2006
Posts: 128
Papua New Guinea
I
Impaler Offline OP
Member
Impaler  Offline OP
Member
I

Joined: Aug 2006
Posts: 128
Papua New Guinea
Well I tried a combination of those and It's working! . I think the key was the my.narrow = on; my.fat = on;. Thanks for that tip, JazzDude!


Murphey's Law:
<< if anything can go wrong, it will >>

(Murphey was an optimist).

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | 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