diff options
author | Erwin Coumans <blender@erwincoumans.com> | 2009-05-24 02:35:47 +0400 |
---|---|---|
committer | Erwin Coumans <blender@erwincoumans.com> | 2009-05-24 02:35:47 +0400 |
commit | eb8c5f3272b87fffaf017badf55f761de9a04fd1 (patch) | |
tree | 6ce64cb7c6c1a2028a8bdb75bb951f6ad0e01bec /source/gameengine/Ketsji | |
parent | a96ce9453f2a8d39e238d20c1c4dec9fe5becfb5 (diff) |
Set default constraint solver mode more compatible to Blender 2.48 settings, this fixes rigid body stacking in this blend file:
http://blenderartists.org/forum/showpost.php?p=1382653&postcount=102
(todo: expose this setting in World setting GUI)
Expose contact processing threshold in Advanced GUI, next to rigid body margin, called CPT.
Default to 1, makes rigid body stacking a bit more stable, smaller values makes sliding easier (at the cost of easier jittering).
Disabled for 'dynamic' objects that don't rotate, because characters etc. always need smooth sliding.
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r-- | source/gameengine/Ketsji/KX_ConvertPhysicsObject.h | 2 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h b/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h index e48fddb30bd..74042366bae 100644 --- a/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h +++ b/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h @@ -139,6 +139,8 @@ struct KX_ObjectProperties ///////////////////////// double m_margin; + float m_contactProcessingThreshold; + KX_BoundBoxClass m_boundclass; union { KX_BoxBounds box; diff --git a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp index 76642649afc..cdba59dd9ca 100644 --- a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp +++ b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp @@ -1103,6 +1103,8 @@ void KX_ConvertBulletObject( class KX_GameObject* gameobj, (isbulletdyna) ? short(CcdConstructionInfo::AllFilter) : short(CcdConstructionInfo::AllFilter ^ CcdConstructionInfo::StaticFilter); ci.m_bRigid = objprop->m_dyna && objprop->m_angular_rigidbody; + + ci.m_contactProcessingThreshold = objprop->m_contactProcessingThreshold;//todo: expose this in advanced settings, just like margin, default to 10000 or so ci.m_bSoft = objprop->m_softbody; ci.m_bSensor = isbulletsensor; MT_Vector3 scaling = gameobj->NodeGetWorldScaling(); |