Question by
Fanre5 · May 19 at 08:47 AM ·
positionnavmeshnavmeshagentchild objectdestination
Set destination not working with instantiated childs
I have a script to instantiate a gameobject when the agent reaches its position, when instantiated it will randomly choose any of those 2, then 3, etc... this gameobjects belong to a parent (I use the random with childcount and getChild), however my agent won't move to the instances, just the original one. I've tried using it's position and it's localPosition and none of them works, actually if I use the local position it won't even do the set destination to the original one. I can't guess if its a navmesh problem or if there is an error with my scripting. I can add some images so if anyone can help me.
alt text
scriptcapture.png
(15.0 kB)
navmeshterrain.png
(203.3 kB)
Comment
Visual representation of what's happening