x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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: alt text

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?

Product Version: UE 4.15
Tags:
more ▼

asked May 22 '17 at 04:03 PM in C++ Programming

avatar image

Boozee
11 2 4 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question