Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Import .FBX animation and model direction

Discussion in 'Animation' started by camvasey, Sep 22, 2014.

  1. camvasey

    camvasey

    Joined:
    May 23, 2013
    Posts:
    1
    Morning all,

    I am still very new to unity and i am helping animate and model in 3ds max. My question is with the Unity 4.6 buttons and/or button features. I have an animated crane model with the animation already defined with Play Automatically checked. When i place the model in the screen it animated right away. Only thing is, i want to use the button feature in Unity to start and stop the animation. I tried a script of this:

    using UnityEngine;
    using System.Collections;

    public class AnimStart : MonoBehaviour {


    // Use this for initialization
    void Start () {
    animation["Crane"].speed = 0.0F;
    }

    // Update is called once per frame
    void Update () {
    animation["Crane"].speed = 0.2F;
    }
    }

    I was thinking that the button "on Click" feature would allow me to start the animation on the Update function. i am not a coding genius by any means and still trying to understand this, but i am confused with all the tutorials that are out there using java and others i don't quite understand how to do something i thought was going to be simple.

    Thank you in advance.