How do I move my gameobject from -1 , -0.9 , 1.2 to -0.23 , -0.7 , 1.2 while rightmousebutton is held down?
void Update(){
if (Input.GetMouseButtonDown(0){
gameObject.transform.position = new Vector3( -0.23 , -0.7 , 1.2);
}
if (Input.GetMouseButtonUp(0){
gameObject.transform.position = new Vector3(-1 , -0.9 , 1.2);
}
}
Put that on the game object in question, and in general look at the Input docs for reading mouse, keyboard or game controllers.