You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem or limitation you are having in your project
I create particle effects and add them to the tree on events such as a missile exploding. The missile itself is removed from the tree while the particles are added to the parent with one shot finished events for self removal.
The problem here is that the particles inherited velocity is zero and there is no way to change this with node based particles.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
RenderingServer::particles_set_emitter_velocity is precisely the tool needed to update the velocity manually when the particles are created, however this only works on the particles RID which the node do not expose.
I propose that both the particles RID be exposed, and a new method set_velocity be added to the node.
A similar implementation would exist for 3D particles as well.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
I am using this in my fork of godot, but I would prefer this to be in the official godot engine.
// in Missile class
var explosion = Scenes.Instantiate<MissileExplosion>();
explosion.GlobalTransform = GlobalTransform;
explosion.SetVelocity(Velocity); // set_velocityGetParent().AddChild(explosion);
If this enhancement will not be used often, can it be worked around with a few lines of script?
The feature may be used often, especially the part concerning exposure of the RID.
Is there a reason why this should be core and not an add-on in the asset library?
I had attempted to do this as a GDExtension however GPUParticles2D "particles" is only privately accessible.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Describe the project you are working on
A 2D space game
Describe the problem or limitation you are having in your project
I create particle effects and add them to the tree on events such as a missile exploding. The missile itself is removed from the tree while the particles are added to the parent with one shot finished events for self removal.
The problem here is that the particles inherited velocity is zero and there is no way to change this with node based particles.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
RenderingServer::particles_set_emitter_velocity is precisely the tool needed to update the velocity manually when the particles are created, however this only works on the particles RID which the node do not expose.
I propose that both the particles RID be exposed, and a new method
set_velocity
be added to the node.A similar implementation would exist for 3D particles as well.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
I am using this in my fork of godot, but I would prefer this to be in the official godot engine.
If this enhancement will not be used often, can it be worked around with a few lines of script?
The feature may be used often, especially the part concerning exposure of the RID.
Is there a reason why this should be core and not an add-on in the asset library?
I had attempted to do this as a GDExtension however GPUParticles2D "particles" is only privately accessible.
The text was updated successfully, but these errors were encountered: