appsinacup / godot-box2d

Godot Box2D – C++ Godot Extension that integrates the Box2D physics engine.
MIT License
329 stars 15 forks source link

rotation inconsistencies #74

Closed funjobie closed 11 months ago

funjobie commented 11 months ago

Describe the bug while the fix in #71 helped quite a bit, i still believe there is some weirdness in how rotations of bodies are handled. Depending on how my AnimatableBody2D is rotated, i can observe anything from extreme velocity increases to clipping. The master with #73 in particular is more erratic.

grafik

To Reproduce Steps to reproduce the behavior:

  1. Open the scene and play
  2. press r to spawn pinballs over the left and right flipper
  3. interact with the marbles using shift or ctrl (shift is now a lower velocity flip, ctrl is higher velocity flip with initial delay)
  4. observe that the right flipper causes extreme velocity increases, sometimes flips by itself, and sometimes the marble clips through it
  5. stop play
  6. very slightly change the rotation of FlipperR in game GameScene.tscn from 142.6 down to 140.
  7. play again
  8. observe that the physics are working perfectly fine

Expected behavior Consistent physics no matter how bodies are rotated

Project If applicable, add a reproducible project to help explain your problem. project_wild_rotations_2023_11_23_1.zip

Versions (please complete the following information):

Ughuuu commented 11 months ago

Ok hopefully now it should really be fixed. https://github.com/appsinacup/godot-box2d/pull/75

Give it a try after it builds.

funjobie commented 11 months ago

thanks, yes works great now!