-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
[3.5.1] [4.0.rc1] Calling GPUParticles3D.restart() from AnimationPlayer doesn't seem to have an effect on the Editor #73043
Comments
I remember @reduz saying something earlier about the necessity of a TrackType for particles. |
A quick update. It seems that what's happening here is that Call Method tracks will only actually call methods when the scene or game is being run, but not within the editor. Which probably makes sense (you wouldn't want to run The documentation unfortunately doesn't mention this (at least I couldn't find anything about it), so if this is by design, I think the documentation should be updated accordingly. Maybe a toggle can be edited to keyframe events in Method Call tracks so that, when set, the method is also invoked from within the editor? Either way, the issue remains that it's extremely difficult to work on animations that orchestrate a number of one-shot particle effects. Being able to restart particle effects through animations would improve things significantly. |
For anyone finding this, here's a quick and dirty workaround: Step 1: create a custom class that extends GPUParticles3D and adds a new virtual property: @tool
class_name HackedGPUParticles3D
extends GPUParticles3D
@export var hacked_emitting : bool:
get: return emitting
set(v):
emitting = v
restart() Step 2: Use this for your GPU particle effects, or change the types of existing Step 3: Instead of using a Call Method track, use a normal Property track, and set that property to true. |
The fact that methods won't be called when running in the editor should be well documented (and possibly should be communicated to the user in editor). At the very least it should be added to the docs here: https://docs.godotengine.org/en/latest/tutorials/animation/animation_track_types.html#call-method-tracks |
Indeed... I'll keep that in mind as I'm organizing the animation documentation now. |
I'll leave this for you to decide, but in the interest of reducing noise here, maybe this issue should be rewritten or closed in favor of other (possibly new) issues, to better reflect the actual potential changes:
|
Godot version
3.5.1, 4.0.rc1
System information
macOS, Apple M1
Issue description
Resetting a GPU particle effect by invoking its
restart()
function from an animation call track doesn't seem to work.In the attached MRP, I have a one-shot GPU particle effect that is supposed to play at the start of my animation. For this, I've set up the animation to do two things:
emitting
to true (this works)restart()
, in case the effect is still emitting when the animation startsBut the call to
restart()
doesn't seem to have any effect.Notes:
restart()
, it never does anything.Screen recording:
Screen.Recording.2023-02-10.at.16.31.03.mov
Steps to reproduce
Minimal reproduction project
MRP-Godot3-VFX-Timeline.zip
The text was updated successfully, but these errors were encountered: