Animating from current coords

I animated a ball bounce with the Unity animation editor. It works fine but always starts from the starting position it was recorded at. Would a movement path imported from Lightwave or any 3D package do the same? How do I get the object to start such an animation path movement from its current coords ?

Has this been covered anywhere at all ? I’ve searched but can’t find any reference to it. Can anyone suggest how to place such an object, animated on a motion path, wherever the mouse is clicked for example?

Have you tried grouping objects under 1 ?

we had the same issue with Max :slight_smile:

Which version of Unity are you using? It must be an old one if you have any animation editor at all. A thoroughly overhauled editor will be available in the next version of Unity (see this blog post for details.

My current project is on Unity iPhone ver 1.5. I don’t use the Anim editor much, it just was just a little easier to make a quick path movement with that than using Lightwave, although I intend to import a spline path using LW for the purpose of path movement.
Either way, I’m trying to start animating an object along such a path, made with either of the above methods, from the current object coords but, on the Unity-made path it jumps to the animation path start coords.

One solution is to create an empty object in Unity and make it the parent to your 3d imported object (which will have (0,0,0) transform as a child). Then code your scripts using: gameObject.transform.root.position when translating the child 3d object.

Hope that helps…

Thanks noocell, that was helpful. I now have it animating well.
I’m now dabbling with a coroutine experiment. My experiment is this; I have an object constantly moving forward, thus travelling in the direction of its rotational value. Could I call a coroutine such as this;

// co-routine to call...
function move()	{
	 	 
	 		rotation=-150;  
		 yield WaitForSeconds(1.5); 	 
		 
	 rotation=100;	 
			 yield WaitForSeconds(1.5); 	
 
	   rotation=0;	 
			 yield WaitForSeconds(1.0); 	 
			 
}

This moves an object in a rotating (negative) direction for 1.5 seconds, then another (positive) for 1.5, then in a straight line (0 rotation) for 1 second. Is this good practise? If not I’ll look into the Ani.Mate script on the Wiki that seems to do all of this for me.