- Home /
Particles don't follow the transform of the parent gameobject?
So I have a child gameobject on my enemy which has a particle system on it. That child gameobject also has 3 children itself, two of which have particle systems on them. The child gameobject of the enemy (first layer) is placed right about on the enemies hand. Now I have a simple script that sets the gameobject to inactive in the beginning, and then when it's called it sets it active. The particle system and everything though stays at the bosses original position when the scene started though. Am I doing something wrong? Here's the relevant code.
public GameObject crossFireRight;
void Start() {
crossFireRight.SetActive(false);
}
void CrossFire()
{
crossFireRight.SetActive(true);
StartCoroutine(CrossFireLifeTime());
}
IEnumerator CrossFireLifeTime()
{
yield return new WaitForSeconds(4);
crossFireRight.SetActive(false);
}
My guess is I have to get the transform of the enemy at the same time it's called to reset it's transform, but I'm also not sure if that's the most efficient/correct way to do it.
Could you upload a picture of your gameobject hierarchy? I'm having a bit of trouble visualizing it.