Skip to content

Commit

Permalink
Fix controlled particles issue
Browse files Browse the repository at this point in the history
  • Loading branch information
hmans committed Sep 24, 2022
1 parent 29dcba6 commit 2006cdd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/fast-ways-rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"vfx-composer-r3f": patch
---

Fixed a small issue around particle effects that did not include controlled particles.
2 changes: 2 additions & 0 deletions packages/vfx-composer-r3f/src/Particles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ export const Particles = forwardRef<ParticlesImpl, ParticlesProps>(
)

useFrame(() => {
if (!ecs.entities.length) return

/* Make sure the effect's world matrix is up to date */
particles.updateMatrixWorld()

Expand Down

0 comments on commit 2006cdd

Please sign in to comment.