1
This commit is contained in:
1 parent
1798ac3fc5
commit
5e51ba02e0
5 files changed
+744
-25
No files matched your search
+11
-1
@@ -18,7 +18,17 @@ public class PathFollower : Seek
|
||||
{
|
||||
currentParam = path.GetParam(transform.position, currentParam);
|
||||
float targetParam = currentParam + pathOffset;
|
||||
target.transform.position = path.GetPosition(targetParam);
|
||||
|
||||
// Получаем позицию цели от пути
|
||||
Vector3 targetPosition = path.GetPosition(targetParam);
|
||||
|
||||
// **ИСПРАВЛЕНИЕ "ПОЛЕТОВ"**
|
||||
// Принудительно ставим цель на ту же высоту, что и агент
|
||||
targetPosition.y = transform.position.y;
|
||||
|
||||
// Устанавливаем позицию цели для Seek
|
||||
target.transform.position = targetPosition;
|
||||
|
||||
return base.GetSteering();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user