I would like to use an input file that contains vectors of position and attitude and time, and have an animation that moves and rotates a body (or multiple) that usees this input data.
I havnt been able to find an example or info in the manual for this as of yet. (Brand new to unity)
The way you do this is through mecanim. For specifics, look up mecanim tutorial on YouTube and choose the 49 minute one.
Basically, you import a model, you put it in the scene, go to Assets->Create->Animator Controller. Add that animator controller to the model to its Animator component. Open the animator controller, add a few parameters, add in a few custom animations for the model, make some transitions, then make the script. I use Unityjavascript.
Here is how to start:
//put all variables you want here
function Update(){
var yourAnimator : Animator= GetComponent(Animator); // initializing connection to animator
// if you have a parameter named Speed...
if (Input.GetAxis("Vertical")){
yourAnimator.SetFloat("Speed", 10); //setting Speed parameter to 10
}
Make sure to put two animations into the Animator Controller, one idle, one walking, right click on idle state, make transition between idle and walking, and on transition do it upon Speed being greater than 0.1 instead of exit time. (You’ll see what I mean.)