Question by
Dylanpolis · Sep 21, 2016 at 01:21 PM ·
animation
Blender to unity animations
So i use a javascript to set a trigger for an animation. For example i would walk to an area and it starts the animation. I use makehuman then transfer to blender were i make an animation then import to unity to set up the trigger.
var ani : Animator;
var sound : AudioClip;
function Start () {
ani.enabled = false;
}
function OnTriggerEnter () {
AudioSource.PlayClipAtPoint(sound, transform.position);
ani.enabled = true;
Destroy(gameObject);
}
Thats my code witch works fine with everything that does not come from blender. The blender stuff allways comes in a file thats packed with everything including my animation. When i try to drag the animation to the script it dosent work. When i click on the circle thing next to script to import it it only shows the file name with everything and not just the animation. How do i get this animation to work on the trigger?
Comment