@@ -914,8 +914,8 @@ automoverActorFunctions.addActorToAutomoverTable = function(self, actor)
914
914
actor :SetNumberValue (" Automover_OldMoveProximityLimit" , actor .MoveProximityLimit );
915
915
end
916
916
917
- -- Make move proximity much lower so we don't get caught on corners
918
- actor .MoveProximityLimit = 2 ;
917
+ -- Make move proximity much higher so we don't zigzag back and forth
918
+ actor .MoveProximityLimit = 5 ;
919
919
920
920
self .affectedActorsCount = self .affectedActorsCount + 1 ;
921
921
@@ -1127,9 +1127,9 @@ automoverActorFunctions.updateDirectionsFromActorControllerInput = function(self
1127
1127
1128
1128
analogMove = wptPos - actor .Pos ;
1129
1129
1130
- -- the ai only removes points if it's not flying and moving, so let's remove the point if needed
1131
- if analogMove : MagnitudeIsLessThan ( 3 ) then
1132
- actor : RemoveMovePathBeginning () ;
1130
+ -- zero out the axis we're being centred on, if we're only being centred on one
1131
+ if actorData . centeringAxes ~= nil and # actorData . centeringAxes == 1 then
1132
+ analogMove [ actorData . centeringAxes [ 1 ]] = 0 ;
1133
1133
end
1134
1134
1135
1135
analogMove :Normalize ();
@@ -1540,6 +1540,8 @@ automoverActorFunctions.centreActorToClosestNodeIfMovingInAppropriateDirection =
1540
1540
local actor = actorData .actor ;
1541
1541
local actorDirection = actorData .direction ;
1542
1542
1543
+ actorData .centeringAxes = {};
1544
+
1543
1545
local oldClosestNode = actorData .currentClosestNode ;
1544
1546
local closestNode = self :findClosestNode (actor .Pos , actorData .currentClosestNode , true , true ) or actorData .currentClosestNode ;
1545
1547
actorData .currentClosestNode = closestNode ;
@@ -1577,6 +1579,8 @@ automoverActorFunctions.centreActorToClosestNodeIfMovingInAppropriateDirection =
1577
1579
else
1578
1580
centeringAxes = { (directionToUseForCentering == Directions .Up or directionToUseForCentering == Directions .Down ) and " X" or " Y" ; }
1579
1581
end
1582
+ actorData .centeringAxes = centeringAxes ;
1583
+
1580
1584
local gravityAdjustment = SceneMan .GlobalAcc * TimerMan .DeltaTimeSecs * - 1 ;
1581
1585
local centeringSpeedAndDistance = self .movementAcceleration * 5 ;
1582
1586
0 commit comments