Screenspace 3d widget only shows for first player in split-screen

Screen-space 3d widgets only show for the first player and do not show for the other players in split-screen. UE 4.7 p5

Hello Voren,

I was unable to reproduce this issue on our end. I have a few question that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce this in a clean project?
  2. If so, could you provide a detailed list of steps to reproduce this issue on our end?
  3. Could you provide a screen shot of the issue?
  4. Are you receiving any errors?
  5. If so, could you provide them to us?
  1. Yes this is a clean 3rd person project.
  2. Just add a 3d widget and set the “Space” variable to “Screen”. Then add a second player using the “Create player” BB node.
  3. As you can see The text does not show for the second player

  1. No errors other than the visual problems in the above screenshot
  2. NA

Project download showing bug. (look around/up/down you should notice it quick)
http://paulhansen.ninja/MyProject6.zip

I have downloaded that project on multiple different computers and they all show the same problem.

Video of problem:


Please let me know if you want anything else regarding this or if you are still unable to replicate this.

Hello Voren,

I was able to reproduce this issue on our end. I have written up a report (UE-9573) and I have submitted it to the developers for further consideration. I will provide updates with any pertinent information as it becomes available. Thank you for you time and information.

Make it a great day

This is working as intended. The same widget can not be in two places at once, additionally each widget can have different state. For example, imagine a case where you show friendly names in Green and Enemy names in Red. The same widget could not produce this effect, so instead you need separate widgets per player screen.

If you need to use the widget component in a split screen scenario, I’d recommend spawning multiple copies, and assign each one to the player it needs to belong to. You can do this by calling SetOwnerPlayer on the component, that will place it on that player’s screen.

If this is a case you run into a lot, I might recommend making a WidgetComponentSpawnerComponent or something like that, that automatically creates widget components for each local player, manages lifetime…etc.

I know that this post has been answered and is outdated by a year, but your answer is very vague, and I have not managed to find any solution for having 4 players with a text above their head on the screen space per screen in splitscreen. if you could elaborate on your answer, that would be lovely.

Hello ,

I ran through the steps above. After doing so I put in a request to be able to get the local player reference from the player that is created via the create player node. I have provided a link to the public tracker. Please feel free to use the link provided for future updates.

Link: Unreal Engine Issues and Bug Tracker (UE-38622)

Make it a great day

Thank you very much! I hope that they fix the issue soon, while it isn’t a super vital part of the game I am developing, having a way of tagging players in massive maps would be very beneficial. I’ve included a picture of what the issue looks like on my screen, though I understand you’ve done all you can. The picture below shows how only the first player can view the 3d widgets, including his own, the other 3 players widget components, and the 3d widget contained in the blueprint actor in the level.

This is fairly old, but the problem persists and I was unable to find a ready answer. I did create a function in a child of UWidgetComponent to enable setting the owner by ControllerId. This did result in being able to control which player’s screen the widget rendered. I used this with widgetComponets that are scaled by distance to the player and created a component for each local player beyond the first as needed. I have not used C++ much in a long while so someone else will have to chime in if there is an issue with this:

Header:

		UFUNCTION(BlueprintCallable, Category = UserInterface)
		void setOwner(const int32 ControllerId);


CPP:

//Set WidgetCompoenet Owner by ControllerId
void UOwnableWidgetComponent::setOwner(const int32 ControllerId)
{
	if (!GetWorld()) return;
	ULocalPlayer* InPlayer = GEngine->GetLocalPlayerFromControllerId(GetWorld(), ControllerId);
	UWidgetComponent::SetOwnerPlayer(InPlayer);
};

279959-capture.png

There is still no satisfying way to do this using blueprint. However there is a workaround, albeit a bit cheesy. Since only widgets use the local player reference it is possible to get it from an already existing widget. All you need is the “Get Owning Local Player” node from a widget. An easy way to get one is to create a widget with the owning player of your choice (without adding it to the viewport) and then removing it as soon as you got the local player reference.

4 Likes

Nice . .

this is a silly workaround, but i love it… CAUSE IT WORKS. thanks for this idea! :smiley:

When this should be triggered, and in which BP this must be in? I tried a few things but they didn’t work for me. I’m on 5.1.

Anyone else trying to solve this, this works but you need to create 2 separate widget components and then you need to use this hack with player 1 controller.