ryan constantine wrote:
> by "query the host object" i mean it can find the end of the muzzle as
> well as the direction it is pointing in order to know which drection to
> shoot. maybe the host (space ship) should set global variables
> indicating where the muzzle tip is and the direction. then the laser
> would just use the globals. what do you think?
Still confused.
EITHER
------------------------------------------------------------
// LASER BEAM: SPEED OF LIGHT
#declare laserhit=trace(Duck, LaserAim, LaserPosition, Norm);
#if( Norm.x!=0&Norm.y!=0&Norm.z!=0) //syntax may be a bit off
#declare DeadYet=1;
#end
---------------------------------------------------
// OR SHOOT A BUNCH OF BULLETS
#declare Bulletposition=Bulletposition+0.1*Bulletveloc;
#declare Bulletveloc=Bulletveloc-0.1*y;
#if(DeadYet>0.5)
#declare TimeoDeath=TimeoDeath+1;
#else
#if(vlength (DuckPostion-Bulletposition)<ContactDistance) // ala Greg
#declare DeadYet=1;
#end
#end
Post a reply to this message
|