Open Awfyboy opened 3 months ago
I think I ran into the same problem. With the help of a test particle shader, I was able to make the problem a little clearer. When the particles collide, I set their speed to 0 and increase their lifetime slightly. In the video you can see how the particles stick to the obstacles. After I rotated the camera a little, the particles suddenly stick to invisible obstacles. Based on the shape and position, I would say that the camera angle has been doubled during the particle collision. (I have of course also tried other angles).
https://github.com/godotengine/godot/assets/92092511/417f55b9-22b1-4217-a14f-ab9f0f5d9ded
Oh, interesting. So it appears to be a miscalculation of the viewport rotation?
Unfortunately, I don't understand enough about it, but I'm assuming that during particle collision detection, a transformation is wrong.
also on v4.3.beta3.official [82cedc83c]
Tested versions
System information
Windows 11 - Godot v4.2.1 - Compatibility Renderer - Intel UHD Graphics 630
Issue description
This is a basic
GPUParticle2D
node colliding with aLightOccluder2D
. It has collisions mode set asRigid
and aBounce
of 0.6. While it works without the Camera being rotated, it seems to break when the Camera rotates. The particles offset after it collides with the Light Occluder, and it ONLY happens when the Camera2D node is rotated. This issue occurs regardless ofBounce
orFriction
being greater than 0. It always occurs when collisions mode is set asRigid
. No other option seems to cause the issue. I have checked the project in Mobile and Forward+ as well and the issue persists.The scale of the particles also doesn't change the outcome nor does the rotation.
Use Scale
is turned on, but turning it off doesn't solve the issue either.Local Coords
option on the Particle node is off so I don't think that is the issue, and theGPUParticles2D
node is not the parent of theCamera2D
node so I don't think it's an issue with SceneTree order either.Fixed FPS
is set to 0 in this example, but setting it to the default value of 30 doesn't solve the issue, nor does setting it to a higher value. This appears to be an issue with how physics is calculated on Particle instances.Steps to reproduce
Rigid
.Ignore Rotation
off.Minimal reproduction project (MRP)
GodotParticles2DCollisionsBug.zip