I have prefab and its hierarchy is as follows:
bird
-Outline
--mask
--filler
Now I am using this in Update
to move the filler:
filler.gameObject.transform.position = Vector3.MoveTowards(
filler.gameObject.transform.position,
new Vector3(feedBar.gameObject.transform.position.x, -1.1f, filler.gameObject.transform.position.z),
(1f / PlayerPrefs.GetFloat("timetofeedbird", 5)) * Time.deltaTime);
All the instantiated birds have movement in correct direction. But the last one has a movement in reverse direction.
Here is the GIF to explain the issue:
Any idea what the issue here?