// Update is called once per frame void Update() { Vector2 pos = Input.mousePosition; if (!TouchHelper.NotInRects(rects, pos)) { return; } Ray ray = cam.ScreenPointToRay(pos); RaycastHit hit; if (Physics.Raycast(ray, out hit, 5000f)) { string name = hit.transform.gameObject.name; if (name == "Floor") { //print (hit.point); Move(curActive.transform, hit.point); } /*else if(name=="curChair"){ * curActive = goChair; * }else if(name=="curLamp"){ * * }*/ } }