Using Dynamic Pawn's Camera to locate Static Mesh

Hi guys, I have been trying this for a long time and couldn’t find a solution. I am trying to do a world locator project, where you can input coordinates and it’ll take you to that spot in a virtual world.

My issue is that when it flies to the coordinates, the camera doesn’t face the location’s marker, which is like a pin on a map. I want the camera to automatically position itself to look at the pin whenever it flies to a new location. How can I make that happen?

First you need to be more specific about what you actually want to happen. If you’re flying exactly to the location you’re interested in, then looking at it doesn’t make any sense because the camera is sitting right on top of it, right? So you probably want to offset the camera from the location by some amount. How much? In which direction? You need to answer these questions.

Once you know what you want, you just need to work out how to implement it. To start with, the Yaw and Pitch parameters on the FlyToLocationLongitudeLatitudeHeight method of CesiumFlyToComponent will help. For example, one of the simplest things you could do is set the fly to location to be at the same longitude and latitude as your target but with a height 100 meters above it. Then set the Yaw to 0.0 and the Pitch to -90 degrees so that the camera is looking straight down.

I want it to be always facing the coordinate, 45degrees and 500m away. I have tried implementing the way that you have described but my problem is that the camera is not always facing the coordinates.

Exampe, I can be 45degrees and 500m away from the coordinates, but the coordinate is “behind” the camera.

Well, I can’t develop your application for you. But if you share what you’ve written, perhaps I can help identify the problem.

Is it posible to make Dynamic Pawn’s camera to locate the static mesh and set the static mesh at center of the camera?

No, there’s nothing built in to do that. You’d have to do it manually.