Why is this affecting all particles?
Starting a new topic since I do not believe this is a boxes related problem.
My logic must be flawed, but as far as I can tell this should only stop Particles with the specified PresetNames that are not within the defined box and not affect any other Particles.
Code:
for p in MovableMan.Particles do
if p.PresetName == "cube edge glow" or "cube edge glow2" then
if not self.boxboundary:WithinBox(p.Pos) then
p.Vel = Vector(0,0)
end
end
end
When this script is running all bullets and shells that are not within the defined box hang in place a short distance from the muzzle and very very slowly drift down.