Skip to content
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

Rotating an animatableRigidBody2D into liquid will cause phantom collision #281

Open
index3rr opened this issue Oct 14, 2024 · 6 comments
Open
Labels
bug Something isn't working

Comments

@index3rr
Copy link

Describe the bug

When you rotate an animatablerigidbody2d, with script or the remote debug feature in godot, into a place such that it pushes water out of the way, that water will never enter that spot ever again, acting as if there is a collision there even if you rotate the rigidbody back

To Reproduce

Steps to reproduce the behavior:
make AnimatableBody2D
add collision shapes so it forms a box or something to keep the liquid inside
add water inside the container
push play
use the remote section in the scene tree to manipulate the containers rotation
observe how the water will not go back into areas it has been pushed out of

Expected behavior

The water should go back into the area after the AnimatableBody2D is rotated away from the liquid

Environment:

  • OS: Fedora Linux 40 (KDE Plasma)
  • Version: latest
  • Godot Version: 4.3.stable (steam)
  • Type: liquid

Example project(zip)

Archive.tar.gz

Video of issue:
https://github.com/user-attachments/assets/c34f4834-d653-4c18-b4fa-aaecf14c63bf

@index3rr index3rr added the bug Something isn't working label Oct 14, 2024
@index3rr index3rr changed the title Rotating an animatableRigidBody2D into liquid will cause weird collision things Rotating an animatableRigidBody2D into liquid will cause phantom collision Oct 14, 2024
@Ughuuu
Copy link
Contributor

Ughuuu commented Oct 14, 2024

The coupling manager in salva calls update_boundaries which is impl by rapier. Right now I use dynamic boundaries for all objects.
What is special about AnimatableBody2D is that it moves with position but it doesn't teleport, like a static body would, it moves it and collides with everything in it's way. I wonder if that has anything to do with this.
Another thing is it's possible some old colliders remain in the simulation that aren't unregistered correctly?

@Ughuuu
Copy link
Contributor

Ughuuu commented Oct 14, 2024

Does this only happen for animatable body(eg kinematic in rapier), or also for static body, and for rigidbody.

@index3rr
Copy link
Author

it does happen for static body but im having a hard time testing rigidbody because of whatever this glitch is..

water.mp4

@Ughuuu
Copy link
Contributor

Ughuuu commented Oct 14, 2024

Thats not a glitch :D you have a mass of 1 for an object that big. It's physically inaccurate. You need to increase mass. Note in godot objects have mass not density. So the bigger the object and with mass 1, it means its like its made of a very very lightweigth material.

@index3rr
Copy link
Author

alright it works but as far as i can tell the issue doesnt happen with rigidbodies

@Ughuuu
Copy link
Contributor

Ughuuu commented Oct 20, 2024

So mostly with static and animatable, got it. Ok, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants