diff --git a/Assets/AWSIM/Scripts/RandomTraffic/NPCVehicle/Steps/NPCVehicleDecisionStep.cs b/Assets/AWSIM/Scripts/RandomTraffic/NPCVehicle/Steps/NPCVehicleDecisionStep.cs index 46e989bab..d69ea95b5 100644 --- a/Assets/AWSIM/Scripts/RandomTraffic/NPCVehicle/Steps/NPCVehicleDecisionStep.cs +++ b/Assets/AWSIM/Scripts/RandomTraffic/NPCVehicle/Steps/NPCVehicleDecisionStep.cs @@ -39,6 +39,14 @@ private static void UpdateTargetPoint(NPCVehicleInternalState state) if (state.ShouldDespawn || state.CurrentFollowingLane == null) return; + if(state.Vehicle.outerControl == true){ + state.TargetPoint = state.Vehicle.outerTargetPoint; + } + else + { + state.TargetPoint = state.CurrentFollowingLane.Waypoints[state.WaypointIndex]; + } + state.TargetPoint = state.CurrentFollowingLane.Waypoints[state.WaypointIndex]; }