Search Unity

2d Animated sprite sheets problem, help please! :b

Discussion in '2D' started by Rutenis, Jan 1, 2014.

  1. Rutenis

    Rutenis

    Joined:
    Aug 7, 2013
    Posts:
    297
    Hey guys, can someone tell me how to draw sprite animated sheets? Whenever i try to do it, i put this script:


    #pragma strict

    var Player : GameObject;
    var spawnPoint : Transform;


    function OnTriggerEnter(other : Collider){
    if(other.tag == "Player"){
    Destroy(other.gameObject);
    var P : GameObject = Instantiate(Player, spawnPoint.position, Quaternion.identity);
    var sf = Camera.main.GetComponent(SmoothFollow2); // sf - smooth folow
    sf.target = P.transform;
    } else {
    Destroy(other.gameObject);
    }
    }

    But unfortuneately my character is shaking whenever im standing still. Can someone plz tell me whats the problem? :p