fixed error of object rotation not working for pathfinding