I’ve been recently implementing perception to my AI and i did override:
GetActorEyesViewPoint on both AI controller and AICharacter.
The perception system rotate in adequation with my eyes socket until… i run client only.
the perception doesnt rotate anymore using 1 or X client.
If i set listen server with one or no client the perception is updated to the eyes rotation as expected.
So in conclusion as soon as there is no ‘client’ server playing the perception is not being updated at all on all clients, is this a known issue ?
I did not saw any similar issue, been trying to set every possible thing ‘replicated’ but never got any success.
The problem was that you’re using a socket location and rotation of your mesh in the GetActorEyesViewPoint, which is driven by animation. But by default the animation does not seem to update those socket transformations, unless the mesh is in view (or unless you set it to “Always Tick Pose and Refresh Bones”, then it will udpate always, regardless whether its in view or not).
Which means that with the default behavior, your code would only work if the mesh is in view of the server. And if you run as client, then you have a server in the background which doesn’t render anything, so it won’t work there (unless you set it to always refresh the bones).
That setting is for optimization (e.g. if the animiations would be cosmetic only, then you would only need to update them when in view of the player).