File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -316,8 +316,8 @@ Vector3 Renderer::Unproject(const Vector3& screenPoint) const
316
316
{
317
317
// Convert screenPoint to device coordinates (between -1 and +1)
318
318
Vector3 deviceCoord = screenPoint;
319
- deviceCoord.x /= (1024 . 0f ) * 0 .5f ;
320
- deviceCoord.y /= (768 . 0f ) * 0 .5f ;
319
+ deviceCoord.x /= (mScreenWidth ) * 0 .5f ;
320
+ deviceCoord.y /= (mScreenHeight ) * 0 .5f ;
321
321
322
322
// Transform vector by unprojection matrix
323
323
Matrix4 unprojection = mView * mProjection ;
Original file line number Diff line number Diff line change @@ -316,8 +316,8 @@ Vector3 Renderer::Unproject(const Vector3& screenPoint) const
316
316
{
317
317
// Convert screenPoint to device coordinates (between -1 and +1)
318
318
Vector3 deviceCoord = screenPoint;
319
- deviceCoord.x /= (1024 . 0f ) * 0 .5f ;
320
- deviceCoord.y /= (768 . 0f ) * 0 .5f ;
319
+ deviceCoord.x /= (mScreenWidth ) * 0 .5f ;
320
+ deviceCoord.y /= (mScreenHeight ) * 0 .5f ;
321
321
322
322
// Transform vector by unprojection matrix
323
323
Matrix4 unprojection = mView * mProjection ;
Original file line number Diff line number Diff line change @@ -324,8 +324,8 @@ Vector3 Renderer::Unproject(const Vector3& screenPoint) const
324
324
{
325
325
// Convert screenPoint to device coordinates (between -1 and +1)
326
326
Vector3 deviceCoord = screenPoint;
327
- deviceCoord.x /= (1024 . 0f ) * 0 .5f ;
328
- deviceCoord.y /= (768 . 0f ) * 0 .5f ;
327
+ deviceCoord.x /= (mScreenWidth ) * 0 .5f ;
328
+ deviceCoord.y /= (mScreenHeight ) * 0 .5f ;
329
329
330
330
// Transform vector by unprojection matrix
331
331
Matrix4 unprojection = mView * mProjection ;
You can’t perform that action at this time.
0 commit comments