Merge pull request #1325 from hrib/master

fixed math in Camera::project_position
This commit is contained in:
Juan Linietsky 2015-02-09 21:16:15 -03:00
commit cf96855e3f
1 changed files with 1 additions and 1 deletions

View File

@ -604,7 +604,7 @@ Vector3 Camera::project_position(const Point2& p_point) const {
Vector2 point;
point.x = (p_point.x/viewport_size.x) * 2.0 - 1.0;
point.y = (p_point.y/viewport_size.y) * 2.0 - 1.0;
point.y = (1.0-(p_point.y/viewport_size.y)) * 2.0 - 1.0;
point*=vp_size;
Vector3 p(point.x,point.y,-near);