-
-
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
[GodotPhysics] Unexpected behavior while interacting with linear_velocity and state.linear_velocity. #79835
Comments
Can you reproduce this in 3.5 when using GodotPhysics instead of Bullet? |
Yes. With Godot physics it behaves like in Godot 4. But the problem is still present. |
Just to clarify - you do NOT see the problem with Bullet physics in 3.x? |
I'm sorry, let me clarify: In godot 3.x the problem is exactly the same as in godot 4 with godot physics. With bullet, it almost equal, but seems like it still apply some kind of impulse. I think the difference is in implementation there, but the bug is present. |
I would like to attempt to resolve this. I am a little inexperienced with godot but I'd like to try. Where should I start? |
The 3D physics server code is at: https://github.com/godotengine/godot/blob/8367152723ebb96b1c799a9c6c9ac1d85178f80a/servers/physics_server_3d.cpp That said, physics engines are notoriously a difficult area to learn due to a lack of modern game-focused resources. As a result, this may prove challenging to fix. We don't have a whole lot of contributors knowledgeable in the area. |
I'm sorry if this is not useful information, but this error happens when using Godot Jolt too, which is weird cause they are different physics engines. Maybe this help to locate the problem? or this is a bug on a part of the code that Godot Jolt do NOT change / from which inherits, or this same error happens by pure chance on another whole different engine too. |
Godot version
Godot 4 stable and Godot 3.x LTS
System information
Fedora linux
Issue description
If you use some custom logic inside _integrate_forces() to alter the state linear velocity and there is any reference to linear_velocity in physics process, the result in godot 3.5 is that it moves just a little bit, while in godot 4 is totally still.
Steps to reproduce
For the example i created a simple scene in which i apply a force on the linear velocity in _integrate_forces() and added a line that add zero to it in physics process. You will not see any move, but it will work fine if you comment the line adding zero.
Minimal reproduction project
PhysicsBugReproduction.zip
The text was updated successfully, but these errors were encountered: