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?
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.
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*/) {}