Get main camera location from Player Camera Manager
I'm going mad with this, probably something trivial but very little experience here. I'm working on a C++ project and I'd like to move during play (eventually at the press of a button) a couple of SceneCapture2D in order to replicate what my main camera is doing, aka get its location and rotation to them (maybe there's some cleaner way to do so, but it should work anyway).
The problem is this: my game apparently (didn't touch GameMode) utilizes a Player Camera Manager and I can't seem to understand how to get information through that, as it always returns (in BP too) a vector (0,0,0) as both the location and rotator. For the location the default pawn could work, but the rotation is tied to the camera.
This is my simple code to retrieve the rotation: GEngine->GetFirstLocalPlayerController(GetWorld())->PlayerCameraManager->GetCameraRotation();
The same done in BP:
Location and rotation directly from the Camera Manager seems to have been buried and suggests to use the methods referring to the camera instead. I can actually see a CameraActor spawned at play in the world and never moving with the Camera Manager, and I'm quite sure the returned data is referring to it, but that can't be my main camera since it doesn't move with my character.
Any idea where I'm going wrong?
asked May 22 '17 at 04:03 PM in C++ Programming
Follow this question
Once you sign in you will be able to subscribe for any updates here