@@ -553,19 +553,19 @@ function AIDriveStrategyShovelSiloLoader:searchForTrailerToUnloadInto()
553553 local x , y , z = localToWorld (trailer .rootNode , math.abs (distShovelDirectionNode ) + self .distShovelTrailerPreUnload , 0 , 0 )
554554 setTranslation (self .unloadPositionNode , x , y , z )
555555 dirX , dirZ = MathUtil .getDirectionFromYRotation (yRot - math.pi / 2 )
556- setDirection (self .unloadPositionNode , dirX , 0 , dirZ )
556+ setWorldRotation (self .unloadPositionNode , 0 , yRot - math.pi / 2 , 0 )
557557 else
558558 local x , y , z = localToWorld (trailer .rootNode , - math.abs (distShovelDirectionNode ) - self .distShovelTrailerPreUnload , 0 , 0 )
559559 setTranslation (self .unloadPositionNode , x , y , z )
560560 dirX , dirZ = MathUtil .getDirectionFromYRotation (yRot + math.pi / 2 )
561- setDirection (self .unloadPositionNode , dirX , 0 , dirZ )
561+ setWorldRotation (self .unloadPositionNode , 0 , yRot + math.pi / 2 , 0 )
562562 end
563563 if trailer [" spec_pdlc_goeweilPack.balerStationary" ] or trailer .size .length < 4 then
564564 --- Goeweil needs to be approached from behind
565565 self :debug (" Approaching the trailer from behind." )
566566 local x , y , z = localToWorld (trailer .rootNode , 0 , 0 , - math.abs (distShovelDirectionNode ) - distRootNodeToExactFillRootNode - self .distShovelTrailerPreUnload )
567567 setTranslation (self .unloadPositionNode , x , y , z )
568- setRotation (self .unloadPositionNode , 0 , yRot , 0 )
568+ setWorldRotation (self .unloadPositionNode , 0 , yRot , 0 )
569569 end
570570 self :startPathfindingToTrailer ()
571571end
0 commit comments