godotengine / godotengine/godot

GPUParticles3D linear acceleration doesn't respect velocity direction and causes particles to jitter.

Open
#97,590 3 comments 0 reactions 1 assignee Claimed by @QbieShay View on GitHub
bug topic:particles
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

4.3

### System information

Windows 11 - Vulkan - Nvidia RTX 4070 - intel i5 13600KF

### Issue description

Firstly, I don't know if this is a wrong behavior or not so I'm sorry in case I misunderstand how this should work.

1. If you don't set the initial velocity and only use a (!) positive (!) linear acceleration the particles always accelerate down no matter what velocity direction is set, since the acceleration doesn't have direction maybe it should use the velocity direction? (red particles in the MRP)
2. If you don't set the initial velocity and only use a (!) negative (!) linear acceleration the particles jitter (yellow particles in the MRP) - and sometimes go in a different directions too, in case of the MRP the yellow particles sometimes have some which goes down and not up as most of them. Jitter gets even worse if you do set a velocity to a non-zero value such as 1 for min + max.
**EDIT: Actually even if you have velocity set to a positive non-zero value the negative linear acceleration causes the particles to spasm as in the video.**

Note: Green particles in the MRP have a non-zero velocity (positive) to show how it normally works.

You can see everything in the video below:
https://github.com/user-attachments/assets/4d700e31-82a9-4b60-aeed-000c54efa02d

### Steps to reproduce

Use GPUParticles3D, set gravity and animated velocity to 0, set linear acceleration to a positive value, set velocity direction in different direction and observe no changes.
Do the above but this time set the linear acceleration to a negative value and observe the particles' jittered movement.

### Minimal reproduction project (MRP)

[LinearAccelerationTest.zip](https://github.com/user-attachments/files/17174823/LinearAccelerationTest.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.