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>2006-12-16 08:50:38 +0300
committerErwin Coumans <blender@erwincoumans.com>2006-12-16 08:50:38 +0300
commit92379ec21f78ba7a7f7354d3039ef300c0bb2cb4 (patch)
tree3fd43168fe1267d6d654cd5acddf812cda158c64 /source/gameengine/Ketsji
parent3c9a11f24ed9bd131e049e98e86aaee1bcaeb53a (diff)
contribution from RCRuiz:
drawing of rigidbody constraint pivots, and allow passing of full constraint frame.
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r--source/gameengine/Ketsji/KX_BulletPhysicsController.cpp3
-rw-r--r--source/gameengine/Ketsji/KX_ISceneConverter.h6
-rw-r--r--source/gameengine/Ketsji/KX_KetsjiEngine.cpp5
3 files changed, 11 insertions, 3 deletions
diff --git a/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp b/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp
index 6785cb957bc..aa5d1f1cec1 100644
--- a/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp
+++ b/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp
@@ -86,7 +86,8 @@ void KX_BulletPhysicsController::ApplyForce(const MT_Vector3& force,bool local)
MT_Vector3 KX_BulletPhysicsController::GetLinearVelocity()
{
float angVel[3];
- CcdPhysicsController::GetAngularVelocity(angVel[0],angVel[1],angVel[2]);
+ //CcdPhysicsController::GetAngularVelocity(angVel[0],angVel[1],angVel[2]);
+ CcdPhysicsController::GetLinearVelocity(angVel[0],angVel[1],angVel[2]);//rcruiz
return MT_Vector3(angVel[0],angVel[1],angVel[2]);
}
MT_Vector3 KX_BulletPhysicsController::GetVelocity(const MT_Point3& pos)
diff --git a/source/gameengine/Ketsji/KX_ISceneConverter.h b/source/gameengine/Ketsji/KX_ISceneConverter.h
index 8693eb34d6b..2727ce7746e 100644
--- a/source/gameengine/Ketsji/KX_ISceneConverter.h
+++ b/source/gameengine/Ketsji/KX_ISceneConverter.h
@@ -59,14 +59,18 @@ public:
virtual void SetNewFileName(const STR_String& filename) = 0;
virtual bool TryAndLoadNewFile() = 0;
-
+ bool addInitFromFrame;//rcruiz
virtual void ResetPhysicsObjectsAnimationIpo(bool clearIpo) = 0;
+
///this generates ipo curves for position, rotation, allowing to use game physics in animation
virtual void WritePhysicsObjectToAnimationIpo(int frameNumber) = 0;
virtual void TestHandlesPhysicsObjectToAnimationIpo() = 0;
+ ///this is for reseting the position,rotation and scale of the gameobjet that is not dynamic
+ virtual void resetNoneDynamicObjectToIpo()=0;
+
// use blender materials
virtual void SetMaterials(bool val) =0;
virtual bool GetMaterials()=0;
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
index 2e0c5d713dc..e76e28bcb7b 100644
--- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
+++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
@@ -394,6 +394,9 @@ else
* the settings for that preceed the logic and physics
* update. */
m_logger->StartLog(tc_logic, m_kxsystem->GetTimeInSeconds(), true);
+
+ m_sceneconverter->resetNoneDynamicObjectToIpo();//this is for none dynamic objects with ipo
+
scene->UpdateObjectActivity();
if (!scene->IsSuspended())
@@ -456,7 +459,7 @@ else
if (m_game2ipo)
- {
+ {
m_sceneconverter->WritePhysicsObjectToAnimationIpo(++m_currentFrame);
}