diff options
author | Nick Samarin <nicks1987@bigmir.net> | 2010-06-24 02:51:26 +0400 |
---|---|---|
committer | Nick Samarin <nicks1987@bigmir.net> | 2010-06-24 02:51:26 +0400 |
commit | e5b3909726348406172e3b713eb1d1404ba39387 (patch) | |
tree | 27d0e0ad5d42fe48a9d3c0c146b477bb077a28ca | |
parent | c92d0dfdf6b6a03726612f426e1f0e506a899f42 (diff) |
don't add obstacles for navmesh walls in the path following mode
-rw-r--r-- | source/gameengine/Ketsji/KX_SteeringActuator.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/gameengine/Ketsji/KX_SteeringActuator.cpp b/source/gameengine/Ketsji/KX_SteeringActuator.cpp index 3bf8a745177..b733fc79dee 100644 --- a/source/gameengine/Ketsji/KX_SteeringActuator.cpp +++ b/source/gameengine/Ketsji/KX_SteeringActuator.cpp @@ -201,7 +201,7 @@ bool KX_SteeringActuator::Update(double curtime, bool frame) { terminate = false; - static const MT_Scalar WAYPOINT_RADIUS(1.); + static const MT_Scalar WAYPOINT_RADIUS(0.25); if (m_pathUpdateTime<0 || (m_pathUpdatePeriod>=0 && curtime - m_pathUpdateTime>((double)m_pathUpdatePeriod/1000))) @@ -252,8 +252,8 @@ bool KX_SteeringActuator::Update(double curtime, bool frame) if (m_simulation && m_obstacle && !newvel.fuzzyZero()) { KX_RasterizerDrawDebugLine(mypos, mypos + newvel, MT_Vector3(1.,0.,0.)); - m_simulation->AdjustObstacleVelocity(m_obstacle, m_navmesh, newvel, - m_acceleration*delta, m_turnspeed/180.0f*M_PI*delta); + m_simulation->AdjustObstacleVelocity(m_obstacle, m_mode!=KX_STEERING_PATHFOLLOWING ? m_navmesh : NULL, + newvel, m_acceleration*delta, m_turnspeed/180.0f*M_PI*delta); KX_RasterizerDrawDebugLine(mypos, mypos + newvel, MT_Vector3(0.,1.,0.)); } |