Show/Hide Meshes Based on

I am making a Multiplayer game. The perspective is in first person, and I am using a mixture between 3rd person meshes an 1st person ones.
Each player has 2 meshes, a first person one and third person one, each player should be able to see their own First person mesh, and everyone else 3rd person mesh, and they shouldn’t be able to see their own 3rd person mesh, or anyone else’s 1st person mesh.
This is to achieve better readability, and to not have personal meshes getting in the way of the player controlling it.
This is how it works in Overwatch. So that might be a good point of reference.
So how do I hide meshes from specific camera, but not from everyone else?

1 Like

Hi, sorry I’m not really familiar with this, so would you mind expanding a bit more?
I found the node but it just gives a boolean output, so what do I do with that, and what methods should I use to then hide/show the meshes?

Okay, so if a Mesh is “Owned” by a controller, enabling its visibility wont do so for other players?

Great, thanks. It’s implemented now. Monday is my next chance to test this properly on the servers, I’ll double back and accept your answer if it all worked.

Wow! This saves me a lot of backache. I can’t believe I didn’t find out about this sooner! Thank you very much.

Use IsLocalController node. True means the pawn is owned by the controller and this is where you hide ThirdPerson and unhide FirstPerson. If False, hide FirstPerson and unhide ThirdPerson because the pawn is not owned by the controller.

Alternatively, if available, you can use SetOwnerNoSee and SetOnlyOwnerSee nodes. Use what you think is more readable or whatever you prefer.

For showing/hiding meshes, use SetVisibility.

IsLocalController

  • True = FirstPersonMesh → SetVisibility = check New Visibility
  • True = 3rdPersonMesh → SetVisibility = unheck New Visibility
  • False = FirstPersonMesh → SetVisibility = uncheck New Visibility
  • False = 3rdPersonMesh → SetVisibility = check New Visibility

Owned by a “local” controller. Yes. It will be true if the Pawn is yours and false if not.

You’re welcome. Im not sure if you are aware, but you can test multiplayer locally using UE4 multiplayer test feature. Should save you some time.