- Home /
 
 
               Question by 
               mark_sosa · Oct 12, 2016 at 12:19 PM · 
                transform.positionxyz  
              
 
              How can I stop sprite transform.position at specific x,y,z coordinate?
Hello guyz. I've a basic C# script which automaticly move my sprite to the left.
 public static float movespeed = 1.0f;
     // Use this for initialization
     void Start()
     {
 
     }
 
     // Update is called once per frame
     void Update()
     {
 
         transform.position = transform.position + Vector3.left * movespeed * Time.deltaTime;
        
         }
     }
 
               All what I need it's just stop sprite moving at specific coordinate (for example when x = 0) and then change by another sprite. How can I do it?
Thank you in advance!
               Comment
              
 
               
              Your answer