The simple model was only a mental concept Ive never tried using, except in rag-dolling.
And even then you have to use PH_BOX. 3DGS physics seriously sucks on collisions.
Eiieaglh... Really gone wrong with the move, in my best opinion. I cant even see why much of it is there?
This is all I see as being needed.
vec_set(vAhead, vector((key_cuu-key_cud)*75,0,0)); //feed keyboard into engine.
vec_rotate(vAhead, player.pan); //rotates by pan,tilt,roll ALL at the same time...
phent_addvellocal(player,vAhead,NULLVECTOR); // Now apply physics force in the directions it is facing....
But you should probably have a "phent_setmaxspeed" set on the player at physics setup time.
Also, you should 'probably' use
phent_addforcelocal(player,vAhead,player.x); rather than
phent_addvellocal. I think it will give a smoother-looking acceleration.
Dont worry about the questions, its helping me kill a boring work-day.
Post2 ::
Yeah, ditch the c-move completely. And create the bullets/shells inside the tank at the breech.
BUT, I just remembered, be sure to use the PASSABLE flag on any entity
during its physics setup.
eg
set(me.PASSABLE); <<<<<<important
phent_settype(me,PH_RIGID,PH_BOX);
phent_setmass(me,0.012,PH_SPHERE);//45kg
phent_setfriction(me,100);
phent_setdamping(me,2,100);
phent_setgroup(me,2);
reset(me.PASSABLE); <<<<<<important
Otherwise collisions may be triggered (but not yet executed) BEFORE you get the
chance to phent_setgroup....