Okay, I’ve got a model which consists of an attack animation, what I was wondering is, how can I generate a ‘sphere’ consisting of particles from the moment the user hits fire, and when the user lets go of the fire button, it releases the sphere and continues down the path which was specified (similar to raycast). I am a bit confused on this part.
If anything, a point in the right direction would be much appreciated!
Well, I think you should something like this, attach one script like this in one new prefab, this prefab is your fireball. Also this prefab must have a particleEmitter to simulate the fire:
var chargingFireBall = true;
var fireBallEmitter : ParticleEmitter = null;
function Start()
{
fireBallEmitter= gameObject.GetComponent (ParticleEmitter);
}
function Update()
{
if( Input.GetButton("Fire1") && chargingFireBall )
{ fireBallEmitter.maxEmission += 0.1*Time.deltaTime; } //Increase the fire being created
else // ends the charging time and release the ball
{
chargingFireBall = false;
shootFireBall();
}
}
function shootFireBall()
{
/* Make your fireball move, you can use waypoints */
}
Details about emitters here http://unity3d.com/support/documentation/ScriptReference/ParticleEmitter.html
– Kaze_Senshi