NPC as MMOItem detecting User
Posted: 09 Jul 2018, 18:16
Hello everyone.
As you recommended me before, I use Unity Standalone Client for managing npcs in my room. So far I've done so when specific client connects to the server, MMOItems spawn on a location I need. Not so much, I know.
Now I want it so when npc(my MMOItem) detects a player nearby, it starts to follow him using Unity's navmesh. I've found some tutorials of how to do such things, but I need to get player's transform for a script(which is in USC) so npc will start to follow him. I don't have "player's object" in my "Unity Hierarchy", maybe because of AOI. I don't have my npc there neither. But I can see my npc in my main Unity window(which will be used by players).
Shortly, I don't know how to get players near my MMOItems(npcs) in Unity, because I can't see them.
I hope you will understand my problem, I know how bad my explanation is If not, I will attach some screenshots later.
As you recommended me before, I use Unity Standalone Client for managing npcs in my room. So far I've done so when specific client connects to the server, MMOItems spawn on a location I need. Not so much, I know.
Now I want it so when npc(my MMOItem) detects a player nearby, it starts to follow him using Unity's navmesh. I've found some tutorials of how to do such things, but I need to get player's transform for a script(which is in USC) so npc will start to follow him. I don't have "player's object" in my "Unity Hierarchy", maybe because of AOI. I don't have my npc there neither. But I can see my npc in my main Unity window(which will be used by players).
Shortly, I don't know how to get players near my MMOItems(npcs) in Unity, because I can't see them.
I hope you will understand my problem, I know how bad my explanation is If not, I will attach some screenshots later.