Physics engine and limitations

Hi all,

I recently give a try to babylonjs attracted by the huge number of features (especially about physics, and the complete rendering pipeline), the active community and the recent activity on the GitHub project. You have done an admirable job here! :+1:

After playing a while with the physics engine, I observed strong issues preventing me to use it for what I have in mind. The biggest issues are:

  • I choose BabylonJS to help me to choose between the JS physics engine, but very (too?) quickly I had to implement native engine code.
  • the compound impostors are too restrictive:
    1. the center of mass is not automatically computed (Oimo seems to do it, but I doubt it is possible without per-object masses / Ammo&Cannon simply set the center of mass at the origin). Maybe I missed some way to compute the center of mass?
    2. the node hierarchy (containing transformed empty meshes) seems to not work.
  • the motors API is very restrictive, there is only setMotor, and setLimit, and both differ from each physics engines. For example, I would expect to have getAngle() or setTargetPosition() functions. For sure, I expect that I could implement many of them manually, but what a waste of time!

So I hesitate to not use the impostor API and to write my own physics code from scratch using directly Oimo or Ammo :frowning:

I would like to know your feeling about this situation, and if I missed some points?

Adding our physics Guru to the thread @RaananW and @Cedric

Thanks @fabienrohrer for bringing the thread here :slight_smile: This will be way simpler to discuss before creating the resulting Github issues.

1 Like

Indeed! Thank you too.

I remark writing this, that my issues run into a bigger scope.

1 Like