Exemple #1
0
 void FixedUpdate()
 {
     // Interactible drag and drop - Check desk borders before moving
     if (interactible && interactibleState == EInteractibleState.DRAGNDROP)
     {
         Vector3 mouseScreenPos = new Vector3(Input.mousePosition.x, Input.mousePosition.y, interactibleScreenPos.z);
         Vector3 mouseWorldPos  = mainCamera.ScreenToWorldPoint(mouseScreenPos) + interactibleOffset;
         interactible.MoveTo(mouseWorldPos);
     }
 }