From 5d0696052a00ca80043852ca891b1bbe0b70ff1b Mon Sep 17 00:00:00 2001 From: Jorge Bernal Date: Wed, 18 Feb 2015 23:24:02 +0100 Subject: BGE: Fix T41502 Path following jumping New Lock Z velocity parameter was added. This parameter avoid the micro-jumping. By default it is actived except when you load an old file that it is deactived to keep former behaviour. Additionally it was solved another issue related with the acceleration: That is the acceleration value was not taked into account and we had always the maximum linear velocity from the beginning of movement. Now the acceleration is taken into account until we reach the maximum velocity. When you load an old file, the acceleration value is set to the maximum range (1000.f). This way we simulate a maximum velocity constant from the beginning of movement (former behaviour). {F142195} Reviewers: moguri, dfelinto, campbellbarton Reviewed By: campbellbarton Subscribers: sergey Differential Revision: https://developer.blender.org/D1074 --- source/gameengine/Ketsji/KX_SteeringActuator.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/gameengine/Ketsji/KX_SteeringActuator.h') diff --git a/source/gameengine/Ketsji/KX_SteeringActuator.h b/source/gameengine/Ketsji/KX_SteeringActuator.h index 1e8ac9a54f0..3273471c166 100644 --- a/source/gameengine/Ketsji/KX_SteeringActuator.h +++ b/source/gameengine/Ketsji/KX_SteeringActuator.h @@ -62,6 +62,7 @@ class KX_SteeringActuator : public SCA_IActuator int m_pathLen; int m_pathUpdatePeriod; double m_pathUpdateTime; + bool m_lockzvel; int m_wayPointIdx; MT_Matrix3x3 m_parentlocalmat; MT_Vector3 m_steerVec; @@ -89,7 +90,8 @@ public: KX_ObstacleSimulation* simulation, short facingmode, bool normalup, - bool enableVisualization); + bool enableVisualization, + bool lockzvel); virtual ~KX_SteeringActuator(); virtual bool Update(double curtime, bool frame); -- cgit v1.2.3