How to make player model actor invisible to the player camera but allow other cameras to see it

I have a problem, one that I cannot seem to find a solution for anywhere I look.

Basically, I have a camera and a player model, I don’t want to be able to see my player body shown in this image.

I want to make the player body invisible to the own player’s camera, but I want to body to be visible to other player’s cameras as it is a multiplayer game. I have tried making the player body a child of the camera, but that rotates the player body as the camera would rotate because it is a child of the camera and bugs out the player model.

Is there anyway I can make my player body invisible to just its own player camera and no-one else’s without making the player body a child of the camera?

I believe you are looking for the “Owner No See” option in your mesh component’s rendering properties.

2 Likes

If i am correct I need to make the model a child of the camera before I can set “owner no see” but I don’t want that because then my player model rotates with the camera

You just need to make sure that the owner of the mesh is the player that also owns the camera. If you are using a character that contains both a camera and mesh component, the possessing player controller should own it after possession.

Try out this tutorial. It covers the opposite of what you need, but since it hides the head, it’s still relevant.

No, the mesh can be set to OwnerNoSee and, provided it is part of the character/pawn being controlled, it will not be seen by the player controlling it.

Alternatively, if you don’t mind C++, look into UpdateHiddenComponents(), which is part of the player controller class:

	/**
	 * Builds a list of components that are hidden based upon gameplay
	 * @param ViewLocation the view point to hide/unhide from
	 * @param HiddenComponents the list to add to/remove from
	 */
	virtual void UpdateHiddenComponents(const FVector& ViewLocation, TSet<FPrimitiveComponentId>& /*HiddenComponents*/) {}