Skip to content

Improve behaviour of emitting property for one_shot ParticleSystems #7322

Open
@HolonProduction

Description

Describe the project you are working on

Godot Engine

Describe the problem or limitation you are having in your project

The behavior of the emitting property on one shot ParticleSystems is not very intuitive. Calling restart or setting emitting for the first time do the same. When turning emitting of after that the particle system will not emit anymore particles. But now when changing emitting to true again it will be reset to false without any effect. Using emitting = true again is only possible after the particle system would have finished if emitting was never set to false. In addition this reseting takes some time for updating the inspector which makes it feel very bugged. This can confuse users about the stability of particle systems in general and does not help with solving any problems.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

I propose, that setting emitting to true will always trigger restart internaly if one_shot == true. The current behavior feels buggy and serves no real purpose so it should be changed to feel more usefull and reliable. The behavior for setting emitting to false will stay the same as it works and there might be use cases for that.

As the current solution is more like undefined behavior this is not a breaking API change IMHO

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

func set_emitting(p_value):
    ...
    if one_shot and p_value:
       restart()
    ...

I can implement that. The proposal is ment to get feedback on the idea.

If this enhancement will not be used often, can it be worked around with a few lines of script?

Nope

Is there a reason why this should be core and not an add-on in the asset library?

Can only be solved in core

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status

      Needs consensus

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions