Home › Forums › TimelineFX Module › Panning world and TimelineFX › Re: Re: Panning world and TimelineFX
I would just place the effect at exactly the same world coordinates as the car then use particlemanager.setorigin. You might have to do something extra to line it up as by default a particle drawn at 0,0 coordinates is drawn at the centre of the screen.
So, if your map/camera position is 0,0 and the coordinates of one of your game objects is 0,0, then is it drawn at the centre of the screen, or the top left of the screen?
If it’s the top left then you’ll probably need something like:
ParticleManager.SetOrigin(MapPosition_X+GraphicsWidth()/2, MapPosition_Y+GraphicsHeight()/2)
otherwise just
ParticleManager.SetOrigin(MapPosition_X, MapPosition_Y2)
maybe enough.