Selective Visibility in Multiplayer

Not sure if this is the right section.
Is there a way to make assets visible only to certain players?

Example 1: when a character is spawning, they might have a ‘ghost’ mesh that the player and their team mates can see, though the enemy can only see it once the player becomes active.

Example 2: each pawn has a mesh or some other asset (say a life bar) that displays for a player when they are near or locked on. How would you prevent this from being seen by other players?

Hey fishman59 -

There are two commands built into the rendering sub-section of the details panel which offer the control you are looking for. ‘Owner No See’ and ‘Owner Only See’ You can hard set these in the components section of your character blueprint. For your particualr examplkes above this can be done by setting up parent blueprints with the Owner No See and Owner Only See setup that each player’s pawn is then derived from (Child of). You would need to setup two different parents, one for each time so in that way you can control who sees what ghost mesh. This Technic would also work for the second example using a parent and child relationship. For both to be implemented you might need a Master Pawn Blueprint with your lifebar setup, then a ‘Red’ Team Blueprint and a ‘Blue’ Team Blueprint which are children of the Master Pawn Blueprint and finally a individual Character Blueprint which is a child of the red or blue team BPs.

[Good Example of Child Blueprint Relationship can be found here][2]

Thank You

Eric Ketchum

Hi Eric,

Thanks for your fast reply! Just commenting for answer clarity now…

I was a little confused at first because I thought setting “Only Owner See” to false in one client session would make that life-bar viewable in all other client sessions as well. A quick test proves my initial thoughts wrong!

Cheers,

Phil

"for. ‘Owner No See’ and ‘Owner Only See’ You can hard set these in the components section of your character blueprint."

This helped me fix my issue that I was having, so thanks as well for this responce

Hi Eric, can bOwnerNoSee and bOnlyOwnerSee be changed at runtime? I am changing these bools at runtime, but they seem to have no effect.

Hi Kochab -

I would need to know more about the exact methodology you are using and what you are actually trying to achieve but I ran a test in 4.8.1 and they seem to be working for me. I have attached my test project. Feel free to edit it to better illustrate your method and post it back here and I will take a look.

Thank You -

Eric Ketchum

Test_Project_4.8.1

I was doing it in C++. I think this:

 MyComponent->MarkRenderStateDirty();

needs to be done after you change them. I haven’t tested it since I went another way. Thanks though.