Heat flux rotation has important significance in thermal protection since it can shield the heat energy from a selected direction. Combining with tailored metamaterials, transformation thermotics provides a powerful way to manipulate heat flux, and various kinds of thermal meta-devices have been designed including thermal rotator. However, the existing transformation-thermotics-based thermal rotator can only work in a fixed background. Remanufacturing is inevitable when background changes, which is inconvenient and restricts the practical application. Here, we propose a novel mechanism for chameleonlike thermal rotator. The designed rotator can adaptively change its thermal conductivity with the object nearby while rotating heat flux without distorting the background temperature profile, just like a chameleon in nature. Moreover, such rotator is made of transformation-invariant material, thus its constitutive parameters do not change under arbitrary coordinate transformations. Therefore, the proposed rotator also has functionality-invariance beyond shape adjustment, and can theoretically transfer heat flux in arbitrary direction using different shapes of the same material. A prototype rotator was designed and fabricated, and its chameleonlike behavior is successfully demonstrated. Our concept provides a guidance to design chameleonlike thermal meta-devices and can be extended to other fields like acoustics, hydrodynamics, etc. The chameleonlike thermal rotator will have potential applications for the implementation of adaptive and adjustable metamaterials.