Skip to content

fix: Fixed wrong particle position when creating a particle group - #69

Merged
spydon merged 3 commits into
flame-engine:mainfrom
gkjpettet:main
Oct 1, 2022
Merged

fix: Fixed wrong particle position when creating a particle group#69
spydon merged 3 commits into
flame-engine:mainfrom
gkjpettet:main

Conversation

@gkjpettet

Copy link
Copy Markdown
Contributor

Description

Fixes an issue where particles created in ParticleSystem.createParticleGroup() were centred around (0,0) rather than the position stipulated in the group definition. This bug is also present in the JBox2D library.

Checklist

  • The title of my PR starts with a [Conventional Commit] prefix (fix:, feat:, docs: etc).
  • I have read the [Contributor Guide] and followed the process outlined for submitting PRs.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • I have updated/added relevant examples in examples.

Breaking Change

This should not be a breaking change as it implements expected behaviour.

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

Related Issues

Fixes #68

@spydon spydon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thanks!
It would be very good with a unit test for the method, that verifies that it has the expected behavior in regards to the fixed bug, but it's not a requirement.

@alestiago

Copy link
Copy Markdown
Collaborator

Thanks @gkjpettet , by any chance do you have a reference to the issue in the JBox2D library?

@gkjpettet

Copy link
Copy Markdown
Contributor Author

I didn't raise an issue in their repo but the culprit is line 315 in this file.

@spydon
spydon enabled auto-merge (squash) October 1, 2022 12:16
@spydon
spydon merged commit a36e88e into flame-engine:main Oct 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug in particle/particle_system.dart

3 participants