From 3511f8ef9fe6a2a6491fbae3a44a407f280a19e0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 14 Apr 2009 12:34:39 +0000 Subject: BGE Physics Clamp objects min/max velocity. Accessed with bullet physics from the advanced button with dynamic and rigid body objects. - useful for preventing unstable physics in cases where objects move too fast. - can add linear velocity with the motion actuator to give smooth motion transitions, without moving too fast. - minimum velocity means objects don't stop moving. - python scripts can adjust these values speedup or throttle velocity in the existing direction. Also made copy properties from an object with no properties work (in case you want to clear all props) --- source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp') diff --git a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp index 03149859f4d..08e2ea30414 100644 --- a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp +++ b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp @@ -801,6 +801,8 @@ void KX_ConvertBulletObject( class KX_GameObject* gameobj, ci.m_gravity = btVector3(0,0,0); ci.m_localInertiaTensor =btVector3(0,0,0); ci.m_mass = objprop->m_dyna ? shapeprops->m_mass : 0.f; + ci.m_clamp_vel_min = shapeprops->m_clamp_vel_min; + ci.m_clamp_vel_max = shapeprops->m_clamp_vel_max; ci.m_margin = objprop->m_margin; shapeInfo->m_radius = objprop->m_radius; isbulletdyna = objprop->m_dyna; -- cgit v1.2.3