Announcement

Collapse
No announcement yet.

How to fake movement locally (not replicate)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to fake movement locally (not replicate)

    I have 4 main characters that replicate and I have AiAgents that spawn and they follow markers placed in a circle around the main character. I managed to spawn 500 agents and still have 60 fps stable. Here is where I get stuck. I don't want to replicate the AiAgents movement (If I replicated all the AiAgents it drops the fps by a lot. I want to at least have 100 AiAgents per main character). I want to fake it and make them follow their corresponding characters locally.

    Iv'e tried a few things but didn't work.
    Iv'e also tried to search about this and couldn't find anything similar.

    This is a bit confusing for me. Is there any tutorial on how someone achieved a similar thing? or an ideas how I can wrap my head around this. Thank you in advanced.

    Here is my thinking. I replicate main 4 characters. They all spawn and move and replicate. Then for each client, for each character locally I spawn AiAgents and make them follow their corresponding Main character. (Here is the problem How would I spawn for each client and for each character?)

    Well I figured 1 of the problems. By design, AI controller only exist in server / listen server, the only controller you have in client is your own PlayerController. This to prevent case like any client can hack and control any AI as they want.
    Last edited by w2lf; 05-18-2019, 12:16 PM.

    #2
    If you spawn an actor on the server, it will spawn on all connected clients. Then just leave the agent class as non replicated. Movement code can all be handled locally as long as you don't run the logic through rpc event nodes.

    Comment


      #3
      Originally posted by NotSoAccurateNo1 View Post
      If you spawn an actor on the server, it will spawn on all connected clients. Then just leave the agent class as non replicated. Movement code can all be handled locally as long as you don't run the logic through rpc event nodes.
      I am working on my other small game atm. So I can't test it atm. From what I gathered. You can only reference AiController from server. i've also read somewhere that theres a client navpath experimental somewhere you can enable.

      Comment

      Working...
      X