I have scoured the Unity answered board for the simplist way to do this with limited success…
Context: I have an object that moves to a mouse clicked spot (RPG style) using Raycasts. I am trying to add a animation, lets call it a fire ring from the spot of click each time. What is the easiest way to move the location of animation and play it on the point of click?
Is there a animate.tranform(point of raycast) type code?
I think you may be a tad confused on the animation as that is part of a GameObject. If you say cast a spell, for example, you could instantiate a prefab object that has animations, or more likely, particle systems. Regardless, they both would follow the GameObject which has as a transform. So, if I understand your question correctly, you want to translate a mouse click to world coordinates, create a gameobject at that location that has your desired effect (be it animation or particles system, etc).
To answer your second question, no there is no transform for animation since it doesn’t have a transform. The gameobjet that the animation is attached to would, however, which is why the answer to your first question was answered the way it was.
I have this attached to an empty game object at the moment - lost on what to do next…
var thePrefab : GameObject;
function Start () {
if (Input.GetMouseButtonDown(0))
var mousePositionInWorld = Camera.main.ScreenToWorldPoint(Input.mousePosition);
Instantiate(thePrefab,Vector3(mousePositionInWorld.x,0,mousePositionInWorld.z),Quaternion.identity);
}