fabriceci / godot-rapier2d

GDExtension for Rapier2D
MIT License
15 stars 3 forks source link

Update lib.rs to work better and not get stuck for test body motion #23

Closed Ughuuu closed 11 months ago

fabriceci commented 11 months ago

Very good catch with Parry! The parry change solves the problem of the square penetration on flat ground.

However with this PR, the capsule is still stuck.

In the physics test:

https://github.com/fabriceci/godot-rapier2d/assets/6397893/7b1f1eed-2237-4885-860d-d5572c4f0323

in the project move and slide with the little square i sent you, there's a scene with a capsule and a rectangle with a rotation to make a slope, and likewise if you move forward the capsule is blocked. Even with a safe margin of 1px, it will block.

https://github.com/fabriceci/godot-rapier2d/assets/6397893/cce3368b-73f8-4d85-b104-63383f7dd528

I thought the problem was only with the capsule, but I think it's this form that suffers the most, but there is a problem with depenetration.(step 1 or 3).

If you look here with the main scene and the little square as a player, you'll see that there's a jitter here that there shouldn't be:

https://github.com/fabriceci/godot-rapier2d/assets/6397893/d8f17500-66ce-4174-a1b1-e236023f82bd

(if you pay attention you'll see that the square goes in and out of the ground, it should never go in as it's supposed to be de-penetrated, like the Godot Physics behaviour).

Ughuuu commented 11 months ago

Also added readme and license to the addons folder so that when we export binary we have the licensing and readme there too.