-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Moving GPUParticles2D with collision enabled causes particles to collide with nothing #77553
Comments
I can confirm this on 4.1.dev 06ccbfe (Linux, GeForce RTX 4090 with NVIDIA 530.41.03). Increasing Fixed FPS to 1000 or decreasing it to 0 does not resolve this issue. It's worth checking whether this issue occurs in 3D too. |
Confirmed for 4.2.dev1 and improved the minimal reproduction project. I'd be happy if this bug were prioritized higher as this is affecting some of the effects in my game. |
We don't know what is causing this issue, and contributors work on a best-effort basis. Additionally, we don't have that many rendering contributors who are knowledgeable with 2D particle collision. |
I tried running the minimal reproduction project on 4.2 beta1 and didn't notice any issue. I even changed a few settings, but the collisions didn't show any strange behavior. It might have been fixed already. |
I checked again now on 4.2 beta1, and it seems that the bug is still occurring on my end. For reference here's the kind of mouse movement I meant: particles_bug.mp4 |
Oh yeah. Now I can reproduce the bug 👀 (I was moving too slow to notice) |
I've discovered a workaround for the issue, at least for 4.2: Instead of moving the node, you can move the particle's emission_shape_offset and Visibility Rect.
I've also made a scene to test the issue in 3D. From what I'm seeing, it doesn't seem to happen in 3D. Well... I was mistaken before, so check the project below to be sure. 😅 |
Oh. My. God. You are a life saver! I stumbled upon the same problem and your solution works like a charm, many thanks!! :DD |
I tried this solution with no luck unfortunately. I did download op's LocalParticles example and did implement your solution in it and it worked. I think my issue is that I am also rotating. The mouse position never rotates |
I've checked this issue using v4.4-dev6, it still remains the same for 2D, while the 3D particles seem to be working perfectly fine.
From what I tested, it seems that any changes to the Particle2D's Transform will result in bugs. This includes moving, rotating and skewing.
In that case, you need to compensate the offset position with the particle's rotation. This may require some vector calculations. |
Godot version
4.2.dev1
System information
Windows 10, Forward+, Nvidia GeForce GTX 1050
Issue description
When a GPUParticles2D instance that has collision detection enabled and local coords disabled is moved (or its parent is moved, etc.), it appears that some of the particles it has generated will sometimes bounce as if the light occluders moved for them.
Steps to reproduce
The minimal reproduction project has a GPUParticles2D node following the cursor on the screen, emitting a ring of particles every second. A marked light occluder is added.
Fixing the cursor in place allows the particles to move freely and as expected; however, if one moves the cursor back and forth across the occluder while the particles are running, the collision bug will activate, sometimes causing the particles to bounce off nothing or even clip through the collider.
Minimal reproduction project
LocalParticles.zip
The text was updated successfully, but these errors were encountered: