Hello! I am working on a project where in a large landscape, the foliage is procedurally spawned. I tried making a system where if the player tries to chop a tree, the instanced version gets replaced with the actor which is choppable. It works ALMOST correctly, however I’m having some trouble with the replication.
What I did was, from the player character, on keypress, call a server event, which calls a multicast linetrace (i know its dumb, but only solution that came close to working), which then sets the hit results into variables, then calls a server event which spawns the tree at the instanced one’s location, then finally a multicast event which basically removes the instance.
- In game, after doing this, replacement logic works. If client tries to chop instanced mesh, it replaces it with a choppable actor. Shows on server.
- If server tries to chop instanced mesh, replacement works again, however for the client the instanced mesh does not get removed.
Video demonstration:
Edit: OBS scammed me x) Left is server Right is client.
I have digged through the forums and found this post:
Exactly my problem. And the solution doesn’t seem to work for me. I’m not sure what I am doing wrong/missing… Please if you have any idea how I could overcome this problem, let me know. Any tips appreciated!