Characters not attaching to prefab location when spawned?
I'm using one of unity standard assets scripts to have some NPCs follow my character in an endless runner game. I have adapted the AI character control script so that it targets the Player character no matter where the prefab it is on is spawned but my issue is that the NPC itself is not spawning on the individual prefabs themselves. Instead, these NPCs are spawning as part of the prefabs but in the locations where those prefabs were made rather than where they are then being spawned. Essentially they are somehow detached from the location of the prefab and I can't figure out why or how.
Would appreciate the help!
The more I look into it, the more I feel as though it is something to do with the root motion applied and controlled by the script. The one solution I can think of is to disable this root motion upon instantiation of the prefab and then reenable it so that the NPC can perform it's normal behaviours, though I'm not entirely sure how to do this or if this is even definitely the issue.