How can I do this?

How can I make a impulse and movement effect like in OSMOS HD with C++ code.
Like this:

I would Spawn an emitter and use add Movement Input