|
@@ -2952,7 +2952,7 @@ Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int heigh
|
|
}
|
|
}
|
|
else if (camera.projection == CAMERA_ORTHOGRAPHIC)
|
|
else if (camera.projection == CAMERA_ORTHOGRAPHIC)
|
|
{
|
|
{
|
|
- float aspect = (float)CORE.Window.screen.width/(float)CORE.Window.screen.height;
|
|
|
|
|
|
+ double aspect = ((double)width/(double)height);
|
|
double top = camera.fovy/2.0;
|
|
double top = camera.fovy/2.0;
|
|
double right = top*aspect;
|
|
double right = top*aspect;
|
|
|
|
|
|
@@ -2963,8 +2963,6 @@ Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int heigh
|
|
// Calculate view matrix from camera look at (and transpose it)
|
|
// Calculate view matrix from camera look at (and transpose it)
|
|
Matrix matView = MatrixLookAt(camera.position, camera.target, camera.up);
|
|
Matrix matView = MatrixLookAt(camera.position, camera.target, camera.up);
|
|
|
|
|
|
- // TODO: Why not use Vector3Transform(Vector3 v, Matrix mat)?
|
|
|
|
-
|
|
|
|
// Convert world position vector to quaternion
|
|
// Convert world position vector to quaternion
|
|
Quaternion worldPos = { position.x, position.y, position.z, 1.0f };
|
|
Quaternion worldPos = { position.x, position.y, position.z, 1.0f };
|
|
|
|
|