Closed Galllaa closed 2 months ago
This is now reproducing a crash. When the object hits the area, the addon crashes
Fixed the crash. It looks like the gravity works, kind of, just that it tries to move the whole object instead of trying to rotate it.
Ok so it's a bit of a weird issue, I will first put a screenshot of how the case looks like and what you try to achieve:
Basically there is a plus sign that is all perfectly built. This plus sign interacts with an area(the blue thing) and it receives gravity of (2800, 980). Running on both Godot and Rapier the following line results in same gravity:
print(get_gravity()) # (2800, 980)
It seems that it tries to move the shape to the right and down, and its also pinned. Pins work differently in rapier, as they don't have softness.
Trying to move that shape while it's pinned, it's hard to say if it should result in any torque or not. Rapier currently doesnt give it any torque, as it is applying the force to the center, so its trying to move the shape. If you move the pin just a bit, it will have torque.
Will close this for now, it does look like it does what it should, if you think it should do something differently let me know. I know it feels like it should rotate the thing, but the truth is it applies linear_velocity, thats what gravity is.
If a node is pinned the effect of the area2d will not work on that node.
Should behave as all rigibodys behave while under the effect (gravity_direction)
Example
AreaEffect.zip