last day (17 days later) » 

4:35 PM
waiting for skyguy
 
5:05 PM
i have one script on gameobject which is to move the object up and down. Though iam not using the collider based but rather button based

here is the script that operates on function
using UnityEngine;
using System.Collections;

public class MoveAnim : MonoBehaviour {
private Animator anim;

// Use this for initialization
void Start () {
anim = GetComponent<Animator>();
}

// Update is called once per frame
void Update () {

}

public void OnUp () {
anim.CrossFade("Up", 0.0f);
//.Play("Up");
}
as you see on animator i do not use paramter but rather say to animator and play this clip
the cross fade is used to blend in but im not sure it will be smooth
i prefer to go with scritipting though in this case as with script you have much smoother control over animation then animator if you are new to animator
animator is a bit complicated for me
so i try to keep it simple
 
5:47 PM
Ok.. did you see my edits? If I take away the parameter and just have the animation play using anim.Play() on collision enter or exit the platform is moving up and down uncontrollably
What would you suggest?
 

  last day (17 days later) »