279
279
// we will need this to make sure that we remove the right proxy later when unparenting
280
280
proxyShapeInfo->m_userData = childCtrl;
281
281
proxyShapeInfo->SetProxy(childCtrl->GetShapeInfo()->AddRef());
283
283
GetShapeInfo()->AddShape(proxyShapeInfo);
284
284
// create new bullet collision shape from the object shapeinfo and set scaling
285
btCollisionShape* newChildShape = proxyShapeInfo->CreateBulletShape(childCtrl->GetMargin(), childCtrl->getConstructionInfo().m_bGimpact, true);
286
286
newChildShape->setLocalScaling(relativeScale);
287
287
// add bullet collision shape to parent compound collision shape
288
288
compoundShape->addChildShape(proxyShapeInfo->m_childTrans,newChildShape);
289
291
// remember we created this shape
290
292
childCtrl->m_bulletChildShape = newChildShape;
291
293
// recompute inertia of parent