setLinearVelocity() and display.newEmitter()

Hia

I got an object which has a setLinearVelocity.

I want the emitter to follow the object but i get this error:

“attempt to call method ‘setLinearVelocity’ (a nil value)”

The emitter clearly loads. Here is the code:

local bullet\_emitter = display.newEmitter( enemyParams ) -- Center the emitter within the content area bullet\_emitter.x = enemy\_bullet.x bullet\_emitter.y = enemy\_bullet.y

Does setLinearVelocity works with particle emitters?

If not is there any work around?

Nevermind I started playing around with transition.to and I got a good enough result

I did something like this:

enemy\_bullet:setLinearVelocity( vec.x, vec.y ) --set linear velocity of the enemy bullet transition.to(bullet\_emitter,{time=1000,x=vec.x,y=vec.y}) --set the x and y to the linear velocity x/y

If someone got a better idea please share lol