-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
GPUParticles collisions shader code seems broken. Creates jittery bounces when bounce > 0.0 #65707
Comments
snipped from the generated shader.
I poked around for a bit and found out that removing the 2nd if statement seemed to fix the issue for me. Then @celyk proposed this which fixes some friction weirdness
|
This is the last ~25 lines of the result of converting the particle process into a gdshader.
the collision_bounce and collision_friction calculations are being applied to the velocity twice. |
Godot version
4.0.alpha15
System information
Arch Linux, Vulkan
Issue description
GPUParicles bounce is very jittery and doesn't respond well to
collision_bounce
being increased.When checking the gdshader that was generated from the particle process resource, i noticed 2 different places where velocity was being calculated after a collision.
removing the 2nd one appeared to fix the issue, but made
collision_friction
affect the height of the bounce, which it probably shouldn't do.Steps to reproduce
Create a GPUParticle3d node, rigid body, and height field
ensure that the rigid body is inside of the height field, but the particle emitter is not.
set the particle's collision mode to "rigid" and bounce to 1.0
observe the jittery behavior when the particles land on the rigid body
Minimal reproduction project
minimal.tar.gz
The text was updated successfully, but these errors were encountered: