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"

Controlling the camera controlled by CalcCamera by default, and accessing it

Hello ya'll!

Basically, I have a PlayerController and multiple pawns that I want to be able to switch between, while keeping the same camera. I have achieved this by using overriding the CameraCalc function in my PlayerController class.

ReptilePlayerController.cpp

  void AReptilePlayerController::CalcCamera(float DeltaTime, struct FMinimalViewInfo& OutResult)
  {
      OutResult.Location = GetPawn()->GetActorLocation() + FVector(0, 100, 0);
      OutResult.Rotation = FRotator(0, 0, 0);
  }
 

This gives me a camera that follows my pawn around and is placed 100 units from it, which is already great. However, I am unable to change the pitch and yaw of this camera. To be precise, I want to use mouse input to rotate the camera around the pawn. I imagine I'll need a springarm to do this, but I'm not sure how to attach this camera to a springarm if I can't even find it in the code.

Also, I'd like to eventually use the rotation of the camera in a function in the pawn's class.

Product Version: UE 4.8
Tags:
more ▼

asked Jun 28 '15 at 01:09 AM in C++ Programming

avatar image

Xylord
41 9 13 15

(comments are locked)
10|2000 characters needed characters left

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