How can I flyTo Entity keep camera direction same?

How can I flyTo the Entity, keep current camera's pitch, heading and roll same?

If I understand you correctly, you don't want the orientation of the viewer to change when flying to an entity. You can do this by using the flyTo method for the viewer. It takes two parameters, the first being the entity that you want to fly to and second, an optional object where you can control: the duration of the flight, the maximum height during flight, and what you want to use, the offset. The offset type should be Cesium.HeadingPitchRange. I created a sandcastle example. At the top left there are two buttons, the first is the default flyTo while the second has the offset value set to the current cameras heading/pitch/range. I hope this helps.

Thanks for your reply! but I find some bug when the camera horizon close the terrain, it can't fly to the entity.

What version of Cesium are you using? We recently fixed a camera bug like that.
If you’re using the most recent version of Cesium and it’s still giving you problems, can you please put together a Sandcastle code example to reproduce the issue?

Thanks!

-Hannah