How to get camera position in Simulate Mode?
Hi! I am currently writing debug functionality with the help of the UDebugDrawService so I can see on-screen text output during simulate mode. Since I want to display the distance between actors and the spectator pawn, I need the camera position. I tried several things:
The location vector is always 0,0,0. Then I tried to get the SpectatorPawn that was spawned when starting simulate mode. But when I retrieve its location via GetActorLocation() it is also 0,0,0. Anyone got this working?
asked Aug 14 '14 at 02:49 PM in C++ Programming
I believe that the viewport in simulate mode is not controlled by any game object, which means you can't query it for location data. The SpectatorPawn doesn't move when the viewport does (which is why you're getting 0,0,0 for its location). There is a CameraActor that exists during simulate mode, but its location isn't related to the position of the viewport - that's why its location keeps returning as 0,0,0.
answered Aug 14 '14 at 08:05 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here