|
|
c_setminmax & animated entities
#384588
10/05/11 07:52
10/05/11 07:52
|
Joined: Oct 2004
Posts: 900 Lgh
rojart
OP
User
|
OP
User
Joined: Oct 2004
Posts: 900
Lgh
|
c_setminmax or c_updatehull doesn't work properly, like code below:
#include <default.c>
#define PRAGMA_PATH "%EXE_DIR%\templates\models";
void main() {
d3d_lines = 3; level_load("");
you = ent_create("sf_alien.mdl", vector(250,0,0),0);
c_setminmax(you);
//wait(1); c_updatehull(you,1);
}
but this works:
#include <default.c>
#define PRAGMA_PATH "%EXE_DIR%\templates\models";
void main() {
d3d_lines = 3; level_load("");
you = ent_create("sf_alien.mdl", vector(250,0,0),0);
c_setminmax(you);
//wait(1); c_updatehull(you,1);
vec_set(you.min_x, vec_for_min(you.min_x, you));
vec_set(you.max_x, vec_for_max(you.max_x, you));
}
|
|
|
Re: c_setminmax & animated entities
[Re: jcl]
#384614
10/05/11 11:59
10/05/11 11:59
|
Joined: Oct 2004
Posts: 900 Lgh
rojart
OP
User
|
OP
User
Joined: Oct 2004
Posts: 900
Lgh
|
Yes, I tried with physX, but the bounding box is bigger than the collision hull.
Last edited by rojart; 10/05/11 12:01.
|
|
|
Re: c_setminmax & animated entities
[Re: jcl]
#384663
10/05/11 23:51
10/05/11 23:51
|
Joined: Oct 2004
Posts: 900 Lgh
rojart
OP
User
|
OP
User
Joined: Oct 2004
Posts: 900
Lgh
|
c_updatehull also sets the bounding box, but to the size of the current collision hull. Strange, because c_updatehull doesn't work for me, where only the second while loop works:
#include <default.c>
#define PRAGMA_PATH "%EXE_DIR%\templates\models";
void main() {
d3d_lines = 3; level_load("");
vec_set(camera.x, vector(-88,-157, 47));
vec_set(camera.pan, vector(60, -17, 0));
you = ent_create("sf_alien.mdl", nullvector, NULL);
wait(1);
while (you.skill1 < 20)
{
c_updatehull(you, (you.frame = you.skill1++));
wait(-.1);
}
you.skill1 = 0;
while (you.skill1 < 20)
{
you.frame = you.skill1++;
you.eflags |= FAT | NARROW;
vec_set(you.min_x, vec_for_min(you.min_x, you));
vec_set(you.max_x, vec_for_max(you.max_x, you));
wait(-.1);
}
}
|
|
|
|