Godot Version
v4.6.stable.official [89cea1439]
Question
I have a 2D game, and am trying to make a particle effect that looks like dust and debris when the player is drilling through rock. I’ve got it emitting particles, but I need help getting it to randomly pick each particle’s sprite from a sprite sheet.
I have a GPUParticles2D object attached to the player. The texture is set to a sprite sheet (png) with 32 different dust/debris sprites (8 columns x 4 rows). The Material is a CanvasItemMaterial with Particles Animation enabled, and H Frames = 8 and V Frames = 4.
Then in the ParticleProcessMaterial, I adjust all the various emission parameters to get the look I’m going for. This all works, but it always uses the last sprite on the sprite sheet. Clearly it is mostly working, since it is slicing up the sprite sheet to emit just one cell of it. I want each particle to have a random sprite from the sheet (not animated).
From googling around, it sounds like there should be an Animation section in the ParticleProcessMaterial where I need to set Offset and Offset Random to 1. Unfortunately, I can’t make the Animation section appear no matter what I do. I’ve tried tweaking just about every setting, and deleting and recreating the node and resources, but no Animation section appears. Note that there IS an Animation subsection under the Display section, but it doesn’t have an Offset Random parameter.
I also tried to set these values programmatically, but I could only find ParticleProcessMaterial.anim_offset_min and _max. I couldn’t find anything like anim_offset_random
What am I missing?
Thanks!
(Sorry if this isn’t the best place to post this question - it isn’t clear if Particle questions belong to the Shaders or Animation category…)