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:
authorBenoit Bolsee <benoit.bolsee@online.be>2008-10-01 11:55:02 +0400
committerBenoit Bolsee <benoit.bolsee@online.be>2008-10-01 11:55:02 +0400
commit949b6ca80f68d5cb99a0d17dd66238ef15444ac2 (patch)
tree685d682c02661a43b43359c9759d1ba483281b47 /source/gameengine/Ketsji/KX_BulletPhysicsController.cpp
parentf4c1fcefe8a8a9466f4d5b0d8b0a18eac84e34ca (diff)
BGE bug #17688 fixed: Near Sensor Reset not working (for Gamekit)
Implementation of the PHY_IPhysicsController::SetMargin(), GetMargin(), SetRadius() and GetRadius() for Bullet and Sumo to allow resetting the Near sensor radius. For bullet use the new setUnscaledRadius() function to change sphere radius. In pPreparation of a Fh constraint actuator: - Add KX_IPhysicsController::GetRadius() - Fix implementation of KX_BulletPhysicsController::GetVelocity() (velocity at a point in geometric coordinate) - Don't try to set velocity on static object (Bullet will assert) - Add KX_GameObject::GetVelocity() for C access to local velocity
Diffstat (limited to 'source/gameengine/Ketsji/KX_BulletPhysicsController.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_BulletPhysicsController.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp b/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp
index 3d20ce8a3a5..bf838e60210 100644
--- a/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp
+++ b/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp
@@ -115,7 +115,7 @@ MT_Vector3 KX_BulletPhysicsController::GetAngularVelocity()
MT_Vector3 KX_BulletPhysicsController::GetVelocity(const MT_Point3& pos)
{
float linVel[3];
- CcdPhysicsController::GetLinearVelocity(linVel[0],linVel[1],linVel[2]);
+ CcdPhysicsController::GetVelocity(pos[0], pos[1], pos[2], linVel[0],linVel[1],linVel[2]);
return MT_Vector3(linVel[0],linVel[1],linVel[2]);
}
@@ -160,6 +160,12 @@ MT_Scalar KX_BulletPhysicsController::GetMass()
return 0.f;
}
+
+MT_Scalar KX_BulletPhysicsController::GetRadius()
+{
+ return MT_Scalar(CcdPhysicsController::GetRadius());
+}
+
MT_Vector3 KX_BulletPhysicsController::getReactionForce()
{
assert(0);