OK, eh, I have an NPC. he follows the player using Character>NPC Follow across multiple scenes. he exists as a prefab, on entering a new scene while he is following I spawn him in with Object>add, then Object>teleport him into position, and restart the Character>NPC Follow. Most of the time this is working fine. but sometimes he spawns in and refuses to follow the sorting map, causing him to be MASSIVE.
I'm trying to figure out why this might be happening and it's hurting my brain and any assistance would be greatly appreciated.
One thing I have noticed is that in the prefab he has a Follow SortingMap component with Follow Default SortingMap
checked. But if I drag him into the scene it becomes unchecked, and SortingMap To Follow says Missing...
Any ideas what might be causing this behavior?
Thanks!
Joe
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
What are your AC/Unity versions?
If necessary, you can force the character to attach to a given Sorting map with the Character: Change rendering Action, but in this situation I'd recommend using an inactive Player rather than an NPC.
If you enable Player-switching and assign the character as an inactive Player in the Settings Manager, AC will keep track of their position/scene automatically - preventing issues of duplicates when they re-enter their original scene.
Thanks Chris!
AC 1.75.8, Unity 2020.3.22f1
I can believe I didn't think to just add a Character: Change Rendering action! This seems to solve the problem, or at least hide the result of the problem, which is good enough for me!