ReactPhysics3D native extension

ReactPhysics3D bindings for defold.
https://www.reactphysics3d.com/

demo
github

22 Likes

VERSION 0.0.1

First version for tests and play:)

-World
-Rigid/CollisionBody
-Collider
-DebugRenderer
-All convex shapes(Box,Capsule,Sphere,ConvexMesh)

5 Likes

Test it on windows and web.
Project successfully builds for all platforms.
Ios build and working not tested. Need mac and device.
I hope someone try it on ios:)

1 Like

Looks neat!

What benefits would this have over the built in 3D physics? More control?

1 Like

Yes full control:)
-update world by yourself
-create shapes in runtime
-concave meshes(in future)
-you don’t need to add .script to object to get collision_response
-C++ crashes if you do something wrong :sweat_smile:

5 Likes

Very cool! :star_struck: Just tested on MacOS - no problems, works just like in the demo!
Edit: I do get some errors in the console, pm you the file.

5 Likes

Yeah, that’s one of my favorite flaws with the native physics system.
Please vote up here: https://github.com/defold/defold/issues/7151

6 Likes

Looks great!
Is it compatible with Nvidia PhysX?
Can it be multithreaded?

No it don’t support multithreaded. Also from github issues looks like it not thread safety.

I think you can run update in another thread but you need to make sync by your self. Not sure is it realy possible, need tests)

Also html5 build doesn’t support threads, so you will not get any performance boost.

About physX, i don’t know)
PhysX is much bigger with a lot of features.

Reactphysics3d is small if compare with physX.

For me reactphysics3d have all that I need in my games, except bullet flag(Continuous collision detection) for bodies

Thanks for the reply.
Yeah I’m mostly on the lookout for multithreaded physics for VR games. The vast majority of them are physics based and monothreading is always a big choke point for performance even though VR is extremely hard on GPUs.

3 Likes

Version 0.0.2

1.Add ConcaveMeshShape
2. Add HeightFieldShape
3.Some fixes :slight_smile:
4. DOCUMENTATION!!!

16 Likes

This is really nice.

1 Like

Version 0.0.3

1)All joints
-fixed
-slider
-hinge
-ballAndSocket
2)More test scenes

7 Likes

Debug render is very slow. I think it because every line is msg.post
Any ideas how to speedup it?

Also you can crash physics engine in Hinge Chain scene:)

I think we need a new API for this kind of thing. There’s an increasing amount of extensions that have a need to draw debug info at runtime.

6 Likes