that is used for displaying team colours to other players in a multiplayer game.
I want to make the component only render on players that are on the same team as the player that looks at the component. I looked into
bOwnerNoSee
and
bOwnerOnlySee
in the
UPrimitiveComponent
and followed the code path hoping that I could get some idea as to how to create custom render conditions but these variables seem to be deeply hidden into the render loop mechanic and I couldn’t get anywhere.
Any solution to this or any workaround will be greatly appreciated (preferably with minimum RPC calls).
Thank you for the response but I am afraid this won’t work. Like I said, I need the component to only hide for players that are not in the same team as the player that owns the viewport. Hiding all components would result in hiding the component for everyone including teammates.
Would you say the best way to approach this is hide the component for enemies locally on each player somehow or just straight up generate an image on top of teammates’ heads dynamically for each local player?
Just to take a stab at what “render these manually” means for those stumbling upon this. I believe the meaning of this is that we must write custom view logic for these components instead of letting the engine handle it for us. I’m not sure what the implication of hiding a thing in game is but there is certainly a clever way to achieve your described feature w/o making low level engine changes.