0 votes

I'm considering adding Rapier as a physics backend for Godot. From the source code, I recognize that I have to implement the classes that inherit PhysicsServer3D and PhysicsServer2D, then register these classes using PhysicsServer3DManager and PhysicsServer2DManager. Is it possible to write the physics backend using Rust and GDNative, or do I have to modify Godot source code to include the new physics backend?

Godot version 3.3
in Engine by (12 points)

1 Answer

0 votes

From what I've seen, someone has already tried using Rapier in the engine.

It looks like GDNative is treated like a library that can be loaded by the engine. Since the Rust bindings for the engine are mature (at least, that's what I've read; your mileage will probably vary), it should be possible to use Rapier as a physics backend, and it will be unnecessary to edit the main source code of the engine.

by (3,144 points)

I checked that repository. It's not really a true integration. What I'm going to do is to write a phyiscs backend that can be switched to in the Project Setting, like Bullet Physics and Godot Physics.

If that work has already been done, doing the final integration would likely be easier.

I think this would be very helpful as there are multiple bugs related to the physics engine at the moment.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.