@TwistedLeg Okay, I got it. Your suggestion about shader and CUSTOM was right. Someone over at the Godot community explained how to do it. In case anyone has the same issue and stumbles across this thread, here's how to do it:
Convert the process material to a shader material. (Click on the arrow next to "ParticlesMaterial and choose "Convert to Shader Materiual)
Click on the textfile symbol next to "Shader", modify the following:
uniform float initial_linear_velocity;
uniform float emission_angle; // <<<<<<<<< Add this
uniform float initial_angle;
Inside the vertex function, somewhere below if (RESTART || restart) {, change the assignment of CUSTOM.x from base_angle degree_to_rad to (base_angle + emission_angle) degree_to_rad
In the else bracket following the previous if, find where it says CUSTOM.x = base_angle degree_to_rad; and change it to CUSTOM.x += base_angle degree_to_rad;
After the changes are done, you can send the shader an angle parameter by calling $Particles2D.process_material.set_shader_param("emission_angle", your_angle_in_degrees)
I used -global_rotation_degrees here, note I had to make it negative because it was rotating the other way.
Quite a lot of effort to do this, but it taught me how to use the Line2D node to create trails, which I'm certainly going to use. Also figured out how to edit the shader to make it fade over time:
- Add another variable: uniform float alpha_fade;
2: Find the line that says: COLOR = (hue_rot_mat color_value; and change it to COLOR = (hue_rot_mat color_value) - vec4(0, 0, 0, CUSTOM.y * alpha_fade);
Took me a while to figure out that the variables CUSTOM.x, CUSTOM.y and CUSTOM.z do NOT refer to x-, y-, z-axis. CUSTOM.y is the particle's age.