Browse Source

Clarify use of ScreenToWorldPoint(). Closes #1504.

Lasse Öörni 9 years ago
parent
commit
7a16f9ca66
1 changed files with 3 additions and 1 deletions
  1. 3 1
      Source/Urho3D/Graphics/Camera.h

+ 3 - 1
Source/Urho3D/Graphics/Camera.h

@@ -153,7 +153,9 @@ public:
     Ray GetScreenRay(float x, float y) const;
     /// Convert a world space point to normalized screen coordinates (0.0 - 1.0).
     Vector2 WorldToScreenPoint(const Vector3& worldPos) const;
-    /// Convert normalized screen coordinates (0.0 - 1.0) and distance (in Z coordinate) to a world space point. The distance can not be closer than the near clip plane.
+    /// Convert normalized screen coordinates (0.0 - 1.0) and distance along view Z axis (in Z coordinate) to a world space point. The distance can not be closer than the near clip plane.
+    /** Note that a HitDistance() from the camera screen ray is not the same as distance along the view Z axis, as under a perspective projection the ray is likely to not be Z-aligned.
+     */
     Vector3 ScreenToWorldPoint(const Vector3& screenPos) const;
 
     /// Return projection offset.