BGE patch: create new BulletSoftBody data block to store bullet soft body specific...
[blender.git] / source / gameengine / Converter / BL_BlenderDataConversion.cpp
index 5b72a10cd0d04c1c6d403533f3055d9b304c4380..784a103f3e3e290e3813312c234118ddd41dc30f 100644 (file)
@@ -1324,19 +1324,19 @@ void BL_CreatePhysicsObjectNew(KX_GameObject* gameobj,
        objprop.m_angular_rigidbody = (blenderobject->gameflag & OB_RIGID_BODY) != 0;
        
        ///for game soft bodies
-       if (blenderobject->soft)
+       if (blenderobject->bsoft)
        {
-               objprop.m_linearStiffness = blenderobject->soft->inspring;
-               objprop.m_angularStiffness = 1.f;//blenderobject->angularStiffness;
-               objprop.m_volumePreservation = 1.f;//blenderobject->volumePreservation;
-               objprop.m_gamesoftFlag = blenderobject->softflag;//blenderobject->gamesoftFlag;
+               objprop.m_linearStiffness = blenderobject->bsoft->linStiff;
+               objprop.m_angularStiffness = blenderobject->bsoft->angStiff;
+               objprop.m_volumePreservation = blenderobject->bsoft->volume;
+               objprop.m_gamesoftFlag = blenderobject->bsoft->flag;
                
        } else
        {
-               objprop.m_linearStiffness = 0.5;//blenderobject->linearStiffness;
-               objprop.m_angularStiffness = 1.f;//blenderobject->angularStiffness;
-               objprop.m_volumePreservation = 1.f;//blenderobject->volumePreservation;
-               objprop.m_gamesoftFlag = 1;//blenderobject->gamesoftFlag;
+               objprop.m_linearStiffness = 0.5;//blenderobject->bsoft->linStiff;
+               objprop.m_angularStiffness = 1.f;//blenderobject->bsoft->angStiff;
+               objprop.m_volumePreservation = 1.f;//blenderobject->bsoft->volume;
+               objprop.m_gamesoftFlag = 1;//blenderobject->bsoft->flag;
        }
 
        objprop.m_ghost = (blenderobject->gameflag & OB_GHOST) != 0;