Revision: 16828 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16828 Author: ben2610 Date: 2008-09-29 19:46:25 +0200 (Mon, 29 Sep 2008)
Log Message: ----------- BGE patch: fix force application on soft body. Force is applied on each node, it must be reduced by the same extend. Modified Paths: -------------- trunk/blender/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp Modified: trunk/blender/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp =================================================================== --- trunk/blender/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp 2008-09-29 17:08:11 UTC (rev 16827) +++ trunk/blender/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp 2008-09-29 17:46:25 UTC (rev 16828) @@ -962,8 +962,12 @@ body->applyCentralForce(force); btSoftBody* soft = GetSoftBody(); if (soft) + { + // the force is applied on each node, must reduce it in the same extend + if (soft->m_nodes.size() > 0) + force /= soft->m_nodes.size(); soft->addForce(force); - + } } } } _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs