0 votes

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.

Godot version 4.0
in Engine by (515 points)

1 Answer

0 votes

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.

by (16 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.