diff options
author | Jorge Bernal <jbernalmartinez@gmail.com> | 2015-02-19 01:24:02 +0300 |
---|---|---|
committer | Jorge Bernal <jbernalmartinez@gmail.com> | 2015-02-19 01:24:02 +0300 |
commit | 5d0696052a00ca80043852ca891b1bbe0b70ff1b (patch) | |
tree | bbc455ac8d262452748e1a220fa2277351ac15b3 /source/gameengine/Ketsji/KX_SteeringActuator.h | |
parent | bd5154bb2c642d09b95ff8a2d71e404faa6f6f84 (diff) |
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
Diffstat (limited to 'source/gameengine/Ketsji/KX_SteeringActuator.h')
-rw-r--r-- | source/gameengine/Ketsji/KX_SteeringActuator.h | 4 |
1 files changed, 3 insertions, 1 deletions
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); |