I’m trying to apply an effect to one clone among multiple clones upon trigger, but when it happens only the earliest instantiated clone is affected by this.
void OnTriggerStay2D (Collider2D target)
{
if (target.gameObject.tag == "Orb Bullet") {
if (syncAttack.isReflectUpwards && !reflectOnce) {
orbBulletObject.transform.Rotate (0f, 0f, -90f);
reflectOnce = true;
} else if (syncAttack.isReflectDownwards && !reflectOnce) {
orbBulletObject.transform.Rotate (0f, 0f, 90f);
reflectOnce = true;
}
}
}
Any solutions and suggestions to this problem is appreciated.