No announcement yet.

Single camera multiplayer setup issue

  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    I was able to get it working!!!!!

    I was missing bAutoManageActiveCameraTarget = false; in my player controller

    Leave a comment:

  • started a topic Single camera multiplayer setup issue

    Single camera multiplayer setup issue

    I have a level with a camera actor object in it that i want all my clients to use (board game). In my player controller BeginPlay() i have the following code:

    	// Array to store all found actors of type ACameraActor
    	TArray<AActor*> ActorArray;
    	// Find all the camera actors in the level
    	UGameplayStatics::GetAllActorsOfClass(GetWorld(), ACameraActor::StaticClass(), ActorArray);
    	for (int i = 0; i < ActorArray.Num(); ++i)
    		if (ActorArray[i]->GetName().Contains(TEXT("GameCamera")))
    			GameCamera = Cast<ACameraActor>(ActorArray[i]);
    This will remove the other default cameras that are created with the clients.

    The problem i'm having is that the SetViewTargetWithBlend(GameCamera) doesn't work for the clients when I PIE with 2 clients (non dedicated).

    During my research i found that if i change the camera's auto activate for player (for the camera in the level which is currently set to disabled) to player 1 and start the game the camera will get configured correctly for that client

    I also added a level blueprint function input event that will trigger the SetViewTargetWithBlend(GameCamera) and it works fine for the client after the game has loaded and i hit the button.

    How do I get the camera to SetViewTargetWithBlend(GameCamera) on BeginPlay for all clients? Am I missing something?

    Last edited by falola; 08-28-2014, 04:07 AM.