Changing the Gameobject waypoints to Gameobject parent along with the Path tag switches from the child Path Tiles to the Parent tiles gameobject has caused a movement glitch I cannot figure out.
Every time the Ram moves between tiles, it pauses for one second, then continues its movement to the next tile. I have not made any changes to the LERP. And when I revert back to the original waypoints array loop with tagged child tiles, this works fine.
Am I missing something in my implementation of the parent object iteration?
GameObject parent = GameObject.FindGameObjectWithTag("Path");
foreach(Transform child in parent.transform)
{
Waypoint waypoint = child.GetComponent<Waypoint>();
if(waypoint != null)
{
path.Add(waypoint);
}
path.Add(child.GetComponent<Waypoint>());
}
The parent Path gameobject is tagged with Path. The children Tile gameobjects have their tags removed.