Suggestion: Add lifecycle callbacks to particles / particle emitter
- Dominant language
- Kotlin
- Stars
- 3k
- Forks
- 148
- Avg merge
- 13h 44m
- Merged PRs (30d)
- 1
Description
**Currently:**
The particle emitter simulator advances each particle without any lifecycle callbacks
**Suggestion:**
Add lifecycle callbacks for when a particle is created, updated, and killed which could pass the current particle as a parameter. It would be nice to be able to set this on the particle view or particle emitter.
**Use case:**
Being able to have the particles react to environment and other changes in the game which can be done through the lifecycle updates.
For example: My own use case I would like to be able to check if the particle has touched the ground or walls, using my own collision checks, and then stop it from moving any further by turning off the gravity for that particular particle until it is killed. Although I am not sure if that is possible due to the gravity being set on the emitter vs each particle.
Or even have it bounce, change color, size, etc based on what I need by changing the particle properties directly.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the particle emitter simulator and the particle or particle-view entry points. Determine how particles are created, updated, and killed, and whether callbacks can be configured on the particle view or emitter while still allowing particle properties to change. Done should include lifecycle callbacks receiving the current particle for all three stages and support the described per-particle behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100