Translate isn't working correctly with NavAgent prefabs. I'm trying to initialize 36 enemies on 6x6 rooms.
EDIT: Just tested with Cube prefab and everything is working fine. Anyone experienced this problem with NavAgent prefabs?
EDIT 2: Tried adding empty gameobject and then navagent as child. Also did initialisation manually:
transform.position += new Vector3(50f, 0f, 50f);
GameObject navigationagent = (GameObject)Instantiate(navigationagentprefab, transform.position, transform.rotation);
transform.position += new Vector3(100f, 0f, 0f);
navigationagent = (GameObject)Instantiate(navigationagentprefab, transform.position, transform.rotation);
transform.position += new Vector3(100f, 0f, 0f);
navigationagent = (GameObject)Instantiate(navigationagentprefab, transform.position, transform.rotation);
transform.position += new Vector3(100f, 0f, 0f);
navigationagent = (GameObject)Instantiate(navigationagentprefab, transform.position, transform.rotation);
transform.position += new Vector3(100f, 0f, 0f);
navigationagent = (GameObject)Instantiate(navigationagentprefab, transform.position, transform.rotation);
transform.position += new Vector3(100f, 0f, 0f);
navigationagent = (GameObject)Instantiate(navigationagentprefab, transform.position, transform.rotation);
First 4 agents were pretty much next to the object while the other 2 were completely off.
I have a prefab of an enemy and I want to initialise it on a level in 36 (6x6 each room 100f wide) different rooms. The problem is it hits some random variables and start creating them at that location.
I've tried using translate, Translate[] array which kind of worked but then hit some invisible boundaries too. It creates clones and transforms first 5 correctly on x axis. Then everything afterwards is stuck at X= 597.3334, Z=384. Sometimes these blocks are different values. I've tried using Transform[] array and add objects with locations and I encountered these wierd limitations too.