Hi,
I found a strange collision behaviour in POLYGON mode.
This sample shows the effect
#include <acknex.h>
ENTITY* torus;
ENTITY* sphere;
action rotate_torus()
{
while(1)
{
c_rotate(me,vector(time_step,0,0),NULL);
wait(1);
}
}
action move_sphere()
{
while(1)
{
me.y-=time_step*(key_cur-key_cul);
wait(1);
}
}
function main()
{
level_load(NULL);
torus = ent_create("torus.mdl",nullvector,rotate_torus);
torus.emask |= ENABLE_IMPACT|ENABLE_PUSH;
set(torus,POLYGON);
vec_scale(torus.scale_x,10);
sphere = ent_create("sphere.mdl", nullvector, move_sphere);
c_setminmax(sphere);
camera.x = -500;
}
The torus should rotate, but it stucks as long as the sphere is in the center of the torus. If it's moved away from the center with the arrow keys (but still within torus), rotation starts.
So the empty space in the torus triggers a collision. Seems as if the center point is checked for collision when rotating (maybe also when moving).
The models in this sampe are MED - standard size torus and sphere.