BGE patch: fix transform bug on compound shape: child shape didn't take into account parent inverse node. Fix scaling bug on instantiation of compound shape: child shape didn't have correct shape. Note: global scaling doesn't work on compound shape (limitation of Bullet); don't set any scale on the top dynamic object.

This commit is contained in:
Benoit Bolsee
2008-09-13 11:46:07 +00:00
parent dfb5ebb12e
commit ba9d3aa4ab
3 changed files with 25 additions and 4 deletions

View File

@@ -47,6 +47,7 @@ public:
m_radius(1.0),
m_height(1.0),
m_halfExtend(0.f,0.f,0.f),
m_childScale(1.0f,1.0f,1.0f),
m_nextShape(NULL),
m_refCount(1)
{
@@ -96,6 +97,7 @@ public:
btScalar m_height;
btVector3 m_halfExtend;
btTransform m_childTrans;
btVector3 m_childScale;
std::vector<btPoint3> m_vertexArray; // Contains both vertex array for polytope shape and
// triangle array for concave mesh shape.
// In this case a triangle is made of 3 consecutive points