Ahh, I see my error, apparently the particles don't move fast enough for a cast MO ray to work.
Change this:
Code:
function Update(self)
local changeID = 255
changeID = SceneMan:CastMORay(self.Pos,Vector(self.Vel.X, self.Vel.Y),self.ID,-0, true,0)
if changeID ~= 255 then
self.targ = MovableMan:GetMOFromID(changeID)
To:
Code:
local curdist = 10;
for actor in MovableMan.Actors do
local avgx = actor.Pos.X - self.Pos.X;
local avgy = actor.Pos.Y - self.Pos.Y;
local dist = math.sqrt(avgx ^ 2 + avgy ^ 2);
if dist < curdist then
curdist = dist;
self.targ = actor;
end
end
if self.targ ~= nil then