I am working with *.pcf particles and now I have a little problem.
I want that my spawned particle moves from one vector to another, while the target vector is changing constantly.
Vector1 == SEnt – Startposition
[Thinkfunktion, Playervector gets updated]
Vector2 == Playerposition – Targetposition.
and if the particle hits the player (That means, if the particle is on the same vector as the player) the particle should remove itself.
Could someone make a little example? (with bbcode)
That’s what I already tried:
function ENT:Think() [...] ..My bad.. self.Bul_Tar_Dis = bullet:GetOrigin():Distance( self.DefinedTar:GetPos() + Vector( 0, 0, 30) ) -- DISTANCE self.NewBulletPos = bullet:GetOrigin():Sub(Vector(self.Bul_Tar_Dis, self.Bul_Tar_Dis, self.Bul_Tar_Dis)) -- DIFFERENCE bullet:SetOrigin( self.NewBulletPos ) -- MOVEMENT per FRAME [...] end
I tried to substract the difference.
[editline]19th October 2011[/editline]