cocos / cocos-engine

Cocos simplifies game creation and distribution with Cocos Creator, a free, open-source, cross-platform game engine. Empowering millions of developers to create high-performance, engaging 2D/3D games and instant web entertainment.
https://www.cocos.com/en/creator
Other
8.23k stars 1.94k forks source link

Align the triangle mesh implementation of physx and bullet backends #15424

Open yiwenxue opened 1 year ago

yiwenxue commented 1 year ago

The current triangle mesh implementations of different backends have the following differences:

  1. The triangle mesh of the physx backend will calculate the center of mass, and the triangle mesh of the bullet backend will not
  2. The physx backend only uses the first submesh, and the bullet backend will use all submesh

It seems that the triangle mesh implementation of the physx backend is more in line with expectations, so it is recommended that the triangle mesh of the bullet backend also be aligned to the physx backend.

mesh attach point
bullet mesh collider
yiwenxue commented 1 year ago