Hi,
I have a spaceship (dynamic physics body from a spritesheet) and two thruster flames (dynamic physics bodies from spritesheet) on each side of it where the engines are. The flames are attached to the spaceship with a weld joint. The spaceship engines (and thereby the thruster flames) are activted by the user swiping and thereby giving it a direction with applyForce().
The longer the swipe, the more force is applied. The different force/speed is reflected in the size of the thruster flames, which are displayed at scale 1 at full speed and at lower scales for lower speeds (i.e. the width and height of the flames are a function of the speed). The spaceship can also turn along the Z axis (hence the sprite sheet), which means that the position of the thruster flames need to change relative to the spaceship during the turn (to still be where the engines are).
Each sprite sheet frame for the flames contain both of the flames, which means that if I scale the image down, they will also move towards each other (away from the engines) as the entire image gets smaller. On the other hand, if I put the flames in separate sprite sheets I would have to move them relative to the object they are joined to during the turn so that they stay where the engines are (i.e. “manually” assign a position to a dynamic object affected by both gravity and an added force = bad idea).
How can this be done?