Exemple #1
0
 /**
  * Draws an icon at the point of contact on the object, if appropriate.
  */
 public override void DrawGrabIcon()
 {
     if (isHeld && showIcon && KickStarter.CameraMain.WorldToScreenPoint(transform.position).z > 0f && icon != null)
     {
         if (dragMode == DragMode.LockToTrack && track != null && track.IconIsStationary())
         {
             Vector3 screenPosition = KickStarter.CameraMain.WorldToScreenPoint(grabPositionRelative + transform.position);
             icon.Draw(new Vector3(screenPosition.x, screenPosition.y));
         }
         else
         {
             Vector3 screenPosition = KickStarter.CameraMain.WorldToScreenPoint(grabPoint.position);
             icon.Draw(new Vector3(screenPosition.x, screenPosition.y));
         }
     }
 }