Spawn particles only if the containing object is moving forward

There is oldPosition. Also this thread might be helpful if you want custom spawning logic: