I actually find that an entity with just a c_setminmax works fine. The entity shoves into the physics object a little, but it does interact properly.
I came up with this "3D Cursor" concept for a project that I'm working on:
Code:
ENTITY* cur_ent;
BMAP* cur= "rcursor.pcx";
void curent()
{
cur_ent= me;
c_setminmax(me);
my.scale_x= 0.25;
my.scale_y= 0.25;
my.scale_z= 0.25;
while(1)
{
my.pan= camera.pan - 90;
my.tilt= camera.roll;
my.roll= camera.tilt;
mouse_dist+= mickey.z * 0.1;
vec_set(curpos,vector(mouse_cursor.x,mouse_cursor.y,mouse_dist + 50));
vec_for_screen(curpos,camera);
cur_ent.x= curpos.x;
cur_ent.y= curpos.y;
cur_ent.z= curpos.z;
wait(1);
}
}
and a function for switching between 2D and 3D mouse cursors:
void _3dcur_toggle()
{
if(cur_mode== 1)
{
if(mouse_ent== cur_ent)
{
ent_remove(cur_ent);
snd_play(toggle_,100,0);
spawn_mode= 0;
}
else
{
cur_mode= 0;
}
mouse_map= cur;
mouse_dist= 0;
wait(3);
}
if(cur_mode== 0)
{
snd_play(toggle_,100,0);
ent_create("cur.mdl",nullvector,curent);
cur_mode= 1;
spawn_mode= 1;
mouse_map= NULL;
}
}
You may want to change the images, the model, and the camera synchronization calculations (my "cur.mdl" is oriented incorrectly in MED). Other than that, good luck!
Hope this helps