|
strange collision box
#347976
11/21/10 15:41
11/21/10 15:41
|
Joined: Dec 2009
Posts: 53
Vyshess
OP
Junior Member
|
OP
Junior Member
Joined: Dec 2009
Posts: 53
|
I need a collission box for my player-model that has the width and height of this model. So i was using . But that creates a hugh box. there is enough room for two player-models... I didn`t scaled the model. So, why this strange collision box?? thx for help!
A8 Commercial A5 Standart --------------- created games: - Bomber Maniacs
|
|
|
Re: strange collision box
[Re: Vyshess]
#347978
11/21/10 15:54
11/21/10 15:54
|
Joined: May 2009
Posts: 5,377 Caucasus
3run
Senior Expert
|
Senior Expert
Joined: May 2009
Posts: 5,377
Caucasus
|
'c_setminmax(ENTITY*)' sets BBOX depending on all animation frames, so if BBOX is huge big, that means that in some of the animation frames, model moves far from it's origin. So here you need to set custom BBOX. Or (if you don't use them) find animation frames that moves too far from the model's origin, and delete them. But I prefer the first solution. Here is the example:
my.eflags |= FAT | NARROW; // set both flags
wait(1); // wait one frame
vec_set(my.min_x,vector(-50,-50,-50)); // set bounding box to individual values
vec_set(my.max_x,vector(50,50,50));
Call this before the while loop. Good luck.
|
|
|
Re: strange collision box
[Re: 3run]
#347981
11/21/10 16:04
11/21/10 16:04
|
Joined: Dec 2009
Posts: 53
Vyshess
OP
Junior Member
|
OP
Junior Member
Joined: Dec 2009
Posts: 53
|
hmmm...there is no animation frame that would make the box so big... anyway, your first solution fixed my problem. thx 3run!
A8 Commercial A5 Standart --------------- created games: - Bomber Maniacs
|
|
|
Re: strange collision box
[Re: 3run]
#348028
11/21/10 22:22
11/21/10 22:22
|
Joined: Dec 2009
Posts: 53
Vyshess
OP
Junior Member
|
OP
Junior Member
Joined: Dec 2009
Posts: 53
|
oh i forgot something strange. if i change the last value (the red one)-> "vec_set(my.min_x,vector(-50,-50,-50));" to -1 or lower, suddenly the player appears at the top of my testroom and falls down to his position that i set in the WED..but why?
A8 Commercial A5 Standart --------------- created games: - Bomber Maniacs
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|