From 949b6ca80f68d5cb99a0d17dd66238ef15444ac2 Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Wed, 1 Oct 2008 07:55:02 +0000 Subject: 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 --- source/gameengine/Ketsji/KX_NearSensor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/gameengine/Ketsji/KX_NearSensor.cpp') diff --git a/source/gameengine/Ketsji/KX_NearSensor.cpp b/source/gameengine/Ketsji/KX_NearSensor.cpp index 140dd37f5c6..b00cd616a5b 100644 --- a/source/gameengine/Ketsji/KX_NearSensor.cpp +++ b/source/gameengine/Ketsji/KX_NearSensor.cpp @@ -190,13 +190,13 @@ bool KX_NearSensor::Evaluate(CValue* event) { if (m_physCtrl) { - m_physCtrl->SetMargin(m_ResetMargin); + m_physCtrl->SetRadius(m_ResetMargin); } } else { if (m_physCtrl) { - m_physCtrl->SetMargin(m_Margin); + m_physCtrl->SetRadius(m_Margin); } } -- cgit v1.2.3