Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-04-20 19:06:46 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-04-20 19:06:46 +0400
commit874c29cea8e6f9bc411fccf2d6f4cb07e94328d0 (patch)
tree5971e577cf7c02e05a1e37b5ad058c71a6744877 /source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
parent7555bfa793a2b0fc187c6211c56986f35b2d7b09 (diff)
parentc5bc4e4fb1a33eda8c31f2ea02e91f32f74c8fa5 (diff)
2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19323:HEAD
Notes: * blenderbuttons and ICON_SNAP_PEEL_OBJECT were not merged.
Diffstat (limited to 'source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp29
1 files changed, 18 insertions, 11 deletions
diff --git a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
index 602486e0017..08e2ea30414 100644
--- a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
+++ b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
@@ -801,6 +801,8 @@ void KX_ConvertBulletObject( class KX_GameObject* gameobj,
ci.m_gravity = btVector3(0,0,0);
ci.m_localInertiaTensor =btVector3(0,0,0);
ci.m_mass = objprop->m_dyna ? shapeprops->m_mass : 0.f;
+ ci.m_clamp_vel_min = shapeprops->m_clamp_vel_min;
+ ci.m_clamp_vel_max = shapeprops->m_clamp_vel_max;
ci.m_margin = objprop->m_margin;
shapeInfo->m_radius = objprop->m_radius;
isbulletdyna = objprop->m_dyna;
@@ -881,8 +883,10 @@ void KX_ConvertBulletObject( class KX_GameObject* gameobj,
{
shapeInfo->SetMesh(meshobj, false,false);
}
+
+ // Soft bodies require welding. Only avoid remove doubles for non-soft bodies!
if (objprop->m_softbody)
- shapeInfo->setVertexWeldingThreshold(0.01f); //todo: expose this to the UI
+ shapeInfo->setVertexWeldingThreshold1(0.01f); //todo: expose this to the UI
bm = shapeInfo->CreateBulletShape();
//no moving concave meshes, so don't bother calculating inertia
@@ -1103,16 +1107,19 @@ void KX_ConvertBulletObject( class KX_GameObject* gameobj,
if (rbody)
{
- btVector3 linearFactor(
- objprop->m_lockXaxis? 0 : 1,
- objprop->m_lockYaxis? 0 : 1,
- objprop->m_lockZaxis? 0 : 1);
- btVector3 angularFactor(
- objprop->m_lockXRotaxis? 0 : 1,
- objprop->m_lockYRotaxis? 0 : 1,
- objprop->m_lockZRotaxis? 0 : 1);
- rbody->setLinearFactor(linearFactor);
- rbody->setAngularFactor(angularFactor);
+ if (objprop->m_angular_rigidbody)
+ {
+ btVector3 linearFactor(
+ objprop->m_lockXaxis? 0 : 1,
+ objprop->m_lockYaxis? 0 : 1,
+ objprop->m_lockZaxis? 0 : 1);
+ btVector3 angularFactor(
+ objprop->m_lockXRotaxis? 0 : 1,
+ objprop->m_lockYRotaxis? 0 : 1,
+ objprop->m_lockZRotaxis? 0 : 1);
+ rbody->setLinearFactor(linearFactor);
+ rbody->setAngularFactor(angularFactor);
+ }
if (rbody && objprop->m_disableSleeping)
{