Hi all, I am working on a project and stuck on AI Behavior Replication to client. Here is the situation, When player step on the button, it will summon a NPC who will randomly moving around. Then I found out that, after the NPC is summoned, and its behavior is working well on Server, but not on the Client. (I hope I can post the video but I am new user)
Anyway, it looks like this, left one is the client which the Npc is stand still while the right one server’s Npc is Moved a bit:
Here is the Behavior Tree, which works well on server
And the replication setting on the Actor of Npc should set properly, not sure about that, here is the settings:
Also the AI Controller is Set Replicated:
I’ve also considered that is anything goes wrong during I creating the Npc, here is the flow:
First I Call Create Npc Function when Player triggered the button:
In this CreateNpcObject Method, I Spawn the Npc Actor in World, Load the AIController, and let it get possessed by its AIController then.
Finally, adding the Npc Object to an array which should be Replicated with using UPROPERTY(Replicated).
Really Have tried my all idea out, but it still performed badly, if anyone can help me out, it will be appreciated.