Particle Shader - How to rotate particles

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Macryc

Hi. I need a bit of help with particle shaders (GPUparticles3D).
I’m not sure how to rotate the instances in the shader. What is the correct combination of TRANSFOM matrices to use in order to be able to rotate individual particles in the start() function by full 360? I need to them to spawn each with a different Y rotation.

Thanks.

:bust_in_silhouette: Reply From: Robot_With_A_Hat_Gam

There should be a random start rotation and a rotation velocity parameter in the ParticleMaterial’s options, which should be enough for what you are trying to do. You can also set minimum and maximum rotation to 360 to rotate it 360 degrees, but I am not sure why you would rotate them 360 degrees. Perhaps you meant 180?
Also if you still want to use a shader with the ParticleMaterial there is a next pass material in all materials (or just shader ones I don’t remember), but I am not sure that it won’t duplicate the meshes.

I’d also be interested in any answers here.
In my use case I’d like to provide randomized angular velocities for each particle