godot-rapier-2d: Player object in space shooter bullet speeds are much slower and aren't registering hits.

Compared to the actions of default, when set to the Rapier plugin, bullets travel much slower. Regardless of speed they also seem to not trigger the usual methods on collisions as the default does. Setting the speed much higher seems to fix this but doesn’t match the default use. For example, look in the repo I sent @Ughuuu an invite to, should be set to Default and has Rapier (slow version) installed.

Edit: this and any other problems with speed can be fixed by:

if ProjectSettings.get_setting("physics/2d/physics_engine") == "Rapier2D":

and setting the values accordingly. Not sure what the magic number is but maybe something around [ speed *= 20 ] This may also affect other rigid bodies, like how fast the asteroids are when they spawn in, but it probably needs to match the speed of DEFAULT.

another edit: I will try to put a test scene in the res:// with easy bug reproductions so you can just test from there and not have to run the whole project to find the issues.

About this issue

  • Original URL
  • State: closed
  • Created 2 months ago
  • Comments: 21 (13 by maintainers)

Most upvoted comments

Also, idk why, but when testing your project I was reproducing a total system crash(on my macbook m2 pro) after clicking start game. Not sure why, also it was kind of heavy. I would say you could try to have no autoloads/globals and less things overall going on in menu/game. Also the sound effect seemed laggy, idk why. Thats what I saw.

Heh, the one thing about this is the little test project made me see how overcomplicated I was making things and relying on too many plugins… Starting over with Rapier at the get go seems to be working well.

That seems to be happening with the Godot physics too now that I’ve tested things more thoroughly. I’m going to assume it was related and refactor how stuff is working after taking a look at it. I’ll put up an issue if it persists after that and some more testing. Thank you for your help.

On Sat, Apr 20, 2024 at 3:17 PM Dragos Daian @.***> wrote:

Btw, you also said in the title: “and aren’t registering hits”. Is there also a demo related to that? Or was it just related to the force thing?

— Reply to this email directly, view it on GitHub https://github.com/appsinacup/godot-rapier-2d/issues/73#issuecomment-2067771999, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHE6AD73JDXZ4JLCXJPFMTY6LEMZAVCNFSM6AAAAABGOYN5BKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRXG43TCOJZHE . You are receiving this because you authored the thread.Message ID: @.***>

There is an issue on godot side here: https://github.com/godotengine/godot/issues/78866

Just to reiterate, the behaviour in Rapier is the correct one, and the bug is on godot physics. So the objects are moving faster than they should in your version, and in rapier they are moving as they should(not slower, but normal)