Hi Guys!!! I’m Experimenting in unity3D ATM… I’m creating a test scene using 3rd person controller… I have a animation that is “SpellCast1” how can i make a script to Play this animation on left mouse button click and also use a particle to shoot forward? (Kinda like a fireball) any info on this is appreciated especially if there is a tutorial how to achieve this so i learn in the process. Thank you! Best Regards. Andrew.
var Fireball:Rigidbody
var Fireballspeed:int;
function Update(){
If(Input.GetMouseButtonDown){
Animation.Blend(animationName, 1.0, .3);
Fireball = Instantiate(FireballPrefab, Transform.positon, Transform.rotation);
}
Fireball.velocity = transform.TransformDirection(Vector3.forward * Fireballspeed);
}
Hope this helps!