vectors are loving hard
function Player::forget(%this)
{
%start = %this.getEyePoint();
%vec = %this.getEyeVector();
%end = VectorAdd(%start, VectorScale(%vec, 60));
%ray = containerRayCast(%start, %end, $Typemasks::PlayerObjectType | $Typemasks::FXbrickObjectType | $Typemasks::TerrainObjectType | $Typemasks::InteriorObjectType | $TypeMasks::VehicleObjectType, %this);
%huh = getWords(%ray,1,3);
%ee = VectorAdd(%start,%huh);
for(%i=0;%i<10;%i++)
{
%gay = VectorSub(%end,vectorScale(%ee,%i/10));
spawnEmitter(SWDroidBlasterEmitter,%gay);
announce(%ee);
}
}
I'm trying to spawn a beam of particles along a vector, but I can never get the vector right. is there a good method that I can use to place a particle every 1 TU along a vector until the vector ends or gets a containerRaycast object
psuedocode/actual example would be helpful since i'm a dumbass when it comes to TS