Skip to content

Commit

Permalink
Changes to rotation with attached and not attaahced. Initial velocity…
Browse files Browse the repository at this point in the history
… also
  • Loading branch information
Tom-Ski committed Oct 4, 2024
1 parent 31a6f5e commit a1dae6b
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,10 @@ public void init(IEmitter emitterReference, float seed) {
float worldRotation = emitterReference.getWorldRotation();
Vector2 worldScale = emitterReference.getWorldScale();

if (!emitterReference.getEmitterModule().isAttached()) {
velocity.rotate(worldRotation, 0, 0, 1).scl(worldScale.x, worldScale.y, 0);
}

velocity.rotate(worldRotation, 0, 0, 1).scl(worldScale.x, worldScale.y, 0);


spinVelocity.set(particleModule.getInitialSpinVelocity());
Expand Down Expand Up @@ -145,6 +147,12 @@ public void applyAlpha (float alpha, float delta) {
//Step teh particle data

float worldRotation = emitterReference.getWorldRotation();
//world rotation of 0 if not in attached mode
if (!emitterReference.getEmitterModule().isAttached()) {
worldRotation = 0;
}


Vector2 worldScale = emitterReference.getWorldScale();
if (particleModule.hasPositionOverride()) {
Vector3 temp = new Vector3();
Expand Down

0 comments on commit a1dae6b

Please sign in to comment.