Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix particle positions #168

Merged
merged 1 commit into from
Aug 24, 2022
Merged

Conversation

MoritzBrueckner
Copy link
Contributor

I'm creating this PR on behalf of @ QuantumCoderQC who is busy currently, so all credit belongs to him :)

In #164, I fixed the particle positions for scaled volumes but I accidentally broke vertex and face emission with that change. This is fixed now by using the owner's scale and scalePos instead of the owner's dimensions for vert and face emissions, since vertex positions are encoded in a cubic space as big as scalePos. The old code is now exclusively used for volumetric emitters where the positions depend on the dimensions of the emitter.

By also dividing the scaleFactor by the particle's scalePos, another bug is fixed that would result in a slight mispositioning of particles if their origin was not at the center of geometry.

Co-authored-by: Moritz Brückner <17685000+MoritzBrueckner@users.noreply.github.com>
@luboslenco luboslenco merged commit 1a6f547 into armory3d:main Aug 24, 2022
@MoritzBrueckner MoritzBrueckner deleted the fix-particles branch August 24, 2022 19:39
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.

3 participants