Hello. I can’t seem to get this to work on client.
The goal is to paint the walls.
On server and singleplayer everything works fine.
Client can paint and server can see whats been painted but client doesnt see it.
Also because of render target the material on the mesh changes color for the server, not on the client, client still has default material on it. What Am I doing wrong?
In rep notify I’m doing the part after SET variable.
I tried also to multicast… Same results all the time. What am I missing???
When you set object properties are replicated, the object itself is not replicated, just the reference to it
So your clients do not actually get the objects (neither the render target nor the dynamic instance)
Even if those objects were replicated, they have no replicated properties so nothing would really transfer over to the clients
I haven’t done something like that before, but I imagine what you want to do is create a render target on each client, and then replicate the “action” that’s happening, like for example client painted this color at this location with this radius
, and then do the simulation on all clients when they receive the actions
Technically you can do it with blueprints, but replicated Arrays offer no way to know what changed, so you’d have to clear and redraw everything every time the repnotify is triggered, unless you keep a temporary structure with which you can somehow map each action to a handled/unhandled state, perhaps through a guid or index, so you can only apply unhandled actions
Thank you very much. I didn’t know these two where not replicatable.
Just in case anyone else needs this. Here is what I did.
On begin play, I removed the auth switch. Made all variables in the screenshot with Replication - None.
I have my drawing code in the paintable actor, it was getting ran server side. I kept it that way.
Ofc I used interface to launch an event in the paintable actor and from that, I simply made a multicast event and that one launched the painting function and it all works.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.