About yawAtDestination in CesiumFlyToController

I am making an airplane fly using FlyToLocationLongitudeLatitudeHeight() method of CesiumFlyToController.cs script, I want my airplane face towards the destination or in the direction of moving while flying. Currently while flying it is just rotating as per the yawAtDestination parameter value of the FlyToLocationLongitudeLatitudeHeight().

Can I somehow make the airplane do yaw in such a way that it faces the direction of moving, if not then is there anyway to stop the logic written in the CesiumFlyToController.cs which is making it do yaw and not letting my logic to execute because i can edit the CesiumFlyToController.cs?

Please help.

1 Like

FlyToLocationLongitudeLatitudeHeight is meant to do camera flights, not to model realistic flight of an aircraft. I don’t think there’s any way to make that function do what you want directly, but feel free to look at the source code and grab the parts of it that are useful to you.