So if I use the line
GameObject sparkles = Instantiate(blockSparklesVFX);
the sparkles do appear
GameObject sparkles = Instantiate(blockSparklesVFX, tranform.position, tranfrom.rotation);
makes nothing appear, can someone please aid me as to why
So if I use the line
GameObject sparkles = Instantiate(blockSparklesVFX);
the sparkles do appear
GameObject sparkles = Instantiate(blockSparklesVFX, tranform.position, tranfrom.rotation);
makes nothing appear, can someone please aid me as to why
I actually figured it out. So if anyone else has this problem I am putting my solution in case. So the z position of my blocks were 14.532, while the background and everything else was 0. So I had to make sure the sparkles would only go with x,y coordinates of the blocks, but not the z.
GameObject sparkles = Instantiate(blockSparklesVFX, transform.position, Quaternion.identity);
sparkles.transform.position = new Vector3(sparkles.transform.position.x, sparkles.transform.position.y, 0);
Destroy(sparkles, 2f);
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.