Quantcast
Channel: Photon Unity Networking (PUN) — Photon Engine
Viewing all articles
Browse latest Browse all 8947

Navmesh not syncing on clients

$
0
0
Hi - I have a Photon projects with a terrain with (up to) 4 players and several NPCs.

The players sync properly. The NPCs, however use a navmesh agent. These NPCs have collision triggers and if any player (with tag=player) comes inside the trigger, the NPC runs away from that player.

I have added Photon View and Photon Animator View and Photon Transform View to the NPCs (like I have on the players)

If the player that logs on first approaches the NPC, it works as expected, it runs away and both players see it moving away and the animations...

However if the client that joins second approaches the NPC, it stutters and doesn't move from their perspective. From the first players point of view the NPC does nothing.

The players always sync well for both, but do not use navmesh agents. Would it be best to sync the trigger event? Is there some other consideration when using navmesh or might I be missing something? Any help is appreciated!

Thanks!

Viewing all articles
Browse latest Browse all 8947

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>