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"

Camera is not being Possessed

Hi guys,

I'm in need of help. I have created an actor with the following components

alt text

These are inherited from a C++ class I'v made, which is all fine. The camera has auto activate on. I've placed the BP in the world and set auto-posses to player 0. I can use my movement fine, but for some reason the camera being used is the CameraActor which is spawned in by default, rather than the camera set up on my player.

alt text

As you can see, the current camera is CameraActor, but there's a camera that should be taken over sitting on the pawn, but it's not.

Any help would be appreciated.

Product Version: UE 4.18
Tags:
capture.png (64.9 kB)
problem.png (636.8 kB)
more ▼

asked Feb 21 '18 at 02:39 AM in Everything Else

avatar image

Cd1232
10 6 8 10

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

2 answers: sort voted first

Not sure what was wrong with the camera. But I recreated my the C++ class and put it in a new level and it worked.

more ▼

answered Feb 22 '18 at 04:09 AM

avatar image

Cd1232
10 6 8 10

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

You either have wrong player ID set (you need to do it if you want this auto possess to work,) or you player controller have bAutoManageActiveCameraTarget to false, which makes possession to not set view target, since possession (taking control of pawn) and setting view target (setting actor that should be viewed in camera) are separate process. By default bAutoManageActiveCameraTarget is true so possession should also set view target. Look what happens in pawn initiation regarding auto possession:

 if (AutoPossessPlayer != EAutoReceiveInput::Disabled && GetNetMode() != NM_Client )
 {
     const int32 PlayerIndex = int32(AutoPossessPlayer.GetValue()) - 1;

     APlayerController* PC = UGameplayStatics::GetPlayerController(this, PlayerIndex);
     if (PC)
     {
         PC->Possess(this);
     }
     else
     {
         GetWorld()->PersistentLevel->RegisterActorForAutoReceiveInput(this, PlayerIndex);
     }
 }

By look of that you case behave like bAutoManageActiveCameraTarget is false as you getting input but view target is not set, you can easily correct whatever is happening by calling "SetViewTarget" for player controller after your pawn is on the level, you can do that in Blueprints too.

more ▼

answered Feb 21 '18 at 04:59 AM

avatar image

Shadowriver
35.8k 926 169 1104

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
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