Пример #1
0
 private void Update()
 {
     if (rotate)
     {
         Ray        ray = Camera.main.ScreenPointToRay(Input.mousePosition);
         RaycastHit hit;
         if (Physics.Raycast(ray, out hit))
         {
             rotatable.LookAt(hit.point);
         }
     }
 }
Пример #2
0
 public void LookAt(Vector3 position)
 {
     rotatable.LookAt(position);
 }