Hi guys,
ok I tried now so many things but I can't figure out how I can spawn one ore many Particle Spawners on a position of my choosing.
I have one scene that just constists of a CPUParticles2D node.
I have setup some nice looking particles and everything looks fine.
In my weapon scene when an area overlaps I want to spawn one of this scene as instance on the location of the object I hit (the enemy).
But no matter what I try it doesn't work.
Here is the code I have so far :
func _on_area_entered(area):
var particles: CPUParticles2D = particleScene.instantiate() as CPUParticles2D
particles.global_position = area.global_position
particles.emitting = true
add_child(particles)
This will spawn the particles but I can't see them at all.
This works, but they will spawn at the weapon, and not at the enemy i hit:
func _on_area_entered(area):
var particles: CPUParticles2D = particleScene.instantiate() as CPUParticles2D
particles.emitting = true
add_child(particles)
I tried with normal position I tried with position of the parent with all kinds of variation and I also tried the box Local Coords on the Particle Node. Nothing every works.
When I add the particles as child of the object I hit, I get weird behaviour that all particles are cramped up together and form like one bigger particle.
Any ideas how I can implement a sytem that actually works? How can I set the position of a CPUParticles2D node?
Edit: I also found this thread on reddit: https://www.reddit.com/r/godot/comments/zw0xp0/so_particles_can_not_be_emitted_in_relation_to/
Is this really not possible?