mirror of https://github.com/axmolengine/axmol.git
multiply scale before construct physics
This commit is contained in:
parent
e659373648
commit
5b8b4fed50
|
@ -695,6 +695,9 @@ bool Physics3DCollisionCallbackDemo::init()
|
||||||
|
|
||||||
float scale = 2.0f;
|
float scale = 2.0f;
|
||||||
std::vector<Vec3> trianglesList = Bundle3D::getTrianglesList("Sprite3DTest/boss.c3b");
|
std::vector<Vec3> trianglesList = Bundle3D::getTrianglesList("Sprite3DTest/boss.c3b");
|
||||||
|
for (auto& it : trianglesList) {
|
||||||
|
it *= scale;
|
||||||
|
}
|
||||||
|
|
||||||
rbDes.mass = 0.0f;
|
rbDes.mass = 0.0f;
|
||||||
rbDes.shape = Physics3DShape::createMesh(&trianglesList[0], (int)trianglesList.size() / 3);
|
rbDes.shape = Physics3DShape::createMesh(&trianglesList[0], (int)trianglesList.size() / 3);
|
||||||
|
|
Loading…
Reference in New Issue