Multiplayer and SetCustomDepthStencilValue

In my game i am using

mesh->SetRenderCustomDepth(true);
mesh->SetCustomDepthStencilValue(2);

to set a stencil outline on a pickup that the player is looking at.

This works correctly however it replicates the stencil value to all players connected to the server and all players see the outline. How would i go about doing this where it only does the stencil outline for the client calling the methods?

I feel like i am missing something simple because the client should not be able to be the authority on the meshes Depth Stencil Value for other clients.

I assume its related to the replication of the material across the server, still find it odd that a client can control that without a server rpc call

the way i did it was to call it locally only, so for instance if the pawn is looking at it do a runonclient event

Wow thanks! I am not sure how i missed that option as i have a lot of client side only stuff ran the same way lol, using UFUCTION(Client) in c++ resolved it.

Thanks again!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.