- Home /
              This question was 
             closed Jan 30, 2019 at 12:40 PM by 
             tormentoarmagedoom for the following reason: 
             
 
            Question is off-topic or not relevant
 
               Question by 
               sairaamin · Aug 24, 2018 at 11:27 AM · 
                movementtouchmousepositionz-axis  
              
 
              move object along x and y axis without affecting its forward z axis
Hi Everyone,
How can i get an object to follow the mouse pointer when it is pressed however to move to the point where the mouse is pressed but move in tandem with the mouse pointer, yet still have the object that is following the mouse pointer on the x and y axis move forward on the z axis at any given rate.
Thanks
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by tormentoarmagedoom · Jan 30, 2019 at 12:40 PM
Good day.
This is a very basic question, you should go learn about vectors and scripting..
 transform.position = new Vector3 (transform.position.x, transform.position.y, transform.position.z)
Just replace some of the compontnts you want to change for the new value
Bye!
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                