I am working on a new game where I have a wizard casting magic.
//what is working
I am able to instantiate the particle system prefab into the scene and add velocity to this game object.
//what is not working
No matter what I have tried, I cannot get this to start at any other position other than 0,0,0
I have tried declaring: a public transform, using the camera, or a part of my player, or grabbing the AC input for the mouse position. Nothing changes.
This is an overly simple task, however I am thinking AC is hanging me up somewhere.
I say this because if I debug out where this instantiated game object was launched from is always shows a 0,0,0.
This is the instantiate line:
GameObject spellObject = Instantiate(spell.spellPrefab, pos, magicSpawn.rotation);
Any help would be greatly appreciated!!
Comments
You can use an Object: Teleport Action immediately afterwards, however, to reposition the newly-spawned object. Just make sure that both Actions refer to the prefab's Constant ID - which should be handled automatically for you.