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:
authorErwin Coumans <blender@erwincoumans.com>2005-07-29 22:14:41 +0400
committerErwin Coumans <blender@erwincoumans.com>2005-07-29 22:14:41 +0400
commitdad6ef9045526b6b26f845151d3ea3b26edaf4a8 (patch)
tree16625df210f25bcf20efcc251722f28934161d38 /source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
parent7d797797c8f6e3eb8fd91bd42cf8e488d14b1d40 (diff)
added physics-debugging
didn't check every single file, so might have broken some gameengine stuff, will fix it this weekend!
Diffstat (limited to 'source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
index 04b08575364..db5d6fa1347 100644
--- a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
+++ b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
@@ -133,7 +133,7 @@ void KX_ConvertSumoObject( KX_GameObject* gameobj,
smmaterial->m_fh_normal = kxmaterial->m_fh_normal;
smmaterial->m_fh_spring = kxmaterial->m_fh_spring;
smmaterial->m_friction = kxmaterial->m_friction;
- smmaterial->m_restitution = kxmaterial->m_restitution;
+ smmaterial->m_restitution = 0.f;//kxmaterial->m_restitution;
SumoPhysicsEnvironment* sumoEnv =
(SumoPhysicsEnvironment*)kxscene->GetPhysicsEnvironment();
@@ -911,9 +911,8 @@ void KX_ConvertBulletObject( class KX_GameObject* gameobj,
halfExtents /= 2.f;
- SimdVector3 he (halfExtents[0]-CONVEX_DISTANCE_MARGIN ,halfExtents[1]-CONVEX_DISTANCE_MARGIN ,halfExtents[2]-CONVEX_DISTANCE_MARGIN );
- he = he.absolute();
-
+ //todo: do this conversion internally !
+ SimdVector3 he (halfExtents[0],halfExtents[1],halfExtents[2]);
bm = new BoxShape(he);
bm->CalculateLocalInertia(ci.m_mass,ci.m_localInertiaTensor);
@@ -957,7 +956,7 @@ void KX_ConvertBulletObject( class KX_GameObject* gameobj,
if (bm)
{
bm->CalculateLocalInertia(ci.m_mass,ci.m_localInertiaTensor);
- bm->SetMargin(0.f);
+ bm->SetMargin(0.05f);
}
break;
}
@@ -1005,8 +1004,8 @@ void KX_ConvertBulletObject( class KX_GameObject* gameobj,
ci.m_restitution = smmaterial->m_restitution;
- ci.m_linearDamping = shapeprops->m_lin_drag;
- ci.m_angularDamping = shapeprops->m_ang_drag;
+ ci.m_linearDamping = 0.5;//shapeprops->m_lin_drag;
+ ci.m_angularDamping = 0.5f;//shapeprops->m_ang_drag;
KX_BulletPhysicsController* physicscontroller = new KX_BulletPhysicsController(ci,dyna);
env->addCcdPhysicsController( physicscontroller);