Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,014 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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 | 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