Announcement

Collapse
No announcement yet.

Setting visibility for more than one player/owner at a time?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Setting visibility for more than one player/owner at a time?

    Hello. I've run into a slight visual bug today and I can't figure out how you'd go about fixing this.

    I'm using a 3d widget popup to show item stats on a lootable item. Works great. I'm using splitscreen, so I have it set the owner to whoever overlaps the item. Works great. Until a second player walks over the item while you're reading the stats. Then they steal the popup and you have to read it off their screen, or walk back over the item to get ownership again.

    How do I go about setting visibility for more than one player at a time?

    #2
    What if you tick "Multi Body Overlap" on the collision settings of the item that overlaps with your player?
    PS1 Graphics

    Comment


      #3
      Hi, this is a similar issue I had and I managed to fix. see the link https://forums.unrealengine.com/deve...er-owned-actor

      Comment


        #4
        Set a variable caching the first player to hit the lootable item using a Do-Once node etc???

        Comment


          #5
          Sorry for the delay. Took Halloween off with the family.

          So the issue isn't that more than one player can't overlap the item. It's that the second player who does overlap the item then becomes the new owner of the item, therefor only becoming visible to that new player. I could also cache the first owner and only show them until they left, sure, but that seems a bit frustrating for players who all want to be comparing stats of the same item to see who needs it.

          I just need a way to display the widget to specific player viewports. Is this possible? Setting visibility for specific viewports or something?

          dzernesto, I'm still looking into what you posted, though just skimming so far I don't think it's the same thing since your issue seems to be server related and mine is simply splitscreen. I'll keep reading though and update here if I find anything useful.

          Thanks for the replies regardless!

          Comment


            #6
            Originally posted by Azaii View Post
            I just need a way to display the widget to specific player viewports. Is this possible?

            Split-Screen:

            2D Textures:
            Event Receive Draw HUD -> Get-Owning-Pawn
            Avoid hard-coding of 'Get-Player-Controller [Player-Index 0] see here
            Tutorials / samples often forget about this and hardcode to 1-Screen.


            3D Widgets:
            Use Add-To-Player-Screen (not Add-To-Viewport for Split-Screen)
            Again use Get-Owning-Player-Pawn, don't hard-code to Player-0 etc.

            Comment


              #7
              Thanks for the reply, but I still think the problem is being misunderstood. I have separate UI working fine. The issue is I have a 3d widget that displays when a player walks over an item pickup. It shows the item's stats/details. But if a second player walks over it, they become the new owner and therefor the first player is unable to see the widget anymore. I need the widget viewable only for players who are standing in the area, but not for other players.

              This isn't very urgent right now. I think I've come up with a way to do it, but I have more pressing matters before I try it.

              My idea was to basically create a new instance of the details panel each time the trigger is overlapped. Should fix it, but again, haven't tested yet.

              Comment


                #8
                Originally posted by Azaii View Post
                My idea was to basically create a new instance of the details panel each time the trigger is overlapped.
                Usually UMG is all instanced by default... That's why split-screen normally works without additional work...
                Are you just spawning a 3D Widget and then linking it to whichever player triggers it...Maybe that's it???
                Anyway instancing is the way to go, or if its a fixed number of players 2-4, give them a dedicated widget.
                Or If these 'popups' are common, attach them to the player inside Pawn Blueprint (hidden when unused)?...

                Comment

                Working...
                X