DanielChappuis / reactphysics3d

Open source C++ physics engine library in 3D
http://www.reactphysics3d.com
zlib License
1.54k stars 223 forks source link

Can we build this as a dll for Unity Engine? #109

Closed Duotun closed 4 years ago

Duotun commented 5 years ago

My thought is to build as a dll for Unity to obtain some useful functions to do the collision detentions. Can this work? Could you please give me some guides to this? Thank you very much!

DanielChappuis commented 5 years ago

ReactPhysics3D is written in C++ and I don't know if it can be used inside Unity. I have never used a C++ library from Unity and I am not sure I can really help you with that.

andreasdr commented 5 years ago

If you compile RP3D with the same compiler Unity uses it should work. I am curious. Why would someone want to do this?

C++ ABI is different across different compilers. You can't compile with MINGW/GCC and use it with MSC unless it is a C API.

andreasdr commented 5 years ago

BTW: I do compile RP3D with clang, gcc and msc. It works out of the box or needs minor adjustments.

Duotun commented 5 years ago

Thank you very much for your responses! Using Unity may save time for rendering and scene management and I want to test the difference between this detection technology and Unity's internal ones.