diff --git a/Examples/Core/Picking3D.cs b/Examples/Core/Picking3D.cs index afe8c10..41c2f86 100644 --- a/Examples/Core/Picking3D.cs +++ b/Examples/Core/Picking3D.cs @@ -54,7 +54,7 @@ public class Picking3d { if (!collision.Hit) { - ray = GetMouseRay(GetMousePosition(), camera); + ray = GetScreenToWorldRay(GetMousePosition(), camera); // Check collision between ray and box BoundingBox box = new( @@ -68,7 +68,7 @@ public class Picking3d collision.Hit = false; } - ray = GetMouseRay(GetMousePosition(), camera); + ray = GetScreenToWorldRay(GetMousePosition(), camera); } //---------------------------------------------------------------------------------- @@ -119,4 +119,3 @@ public class Picking3d return 0; } } - diff --git a/Examples/Core/VrSimulator.cs b/Examples/Core/VrSimulator.cs index 3305588..f2b3894 100644 --- a/Examples/Core/VrSimulator.cs +++ b/Examples/Core/VrSimulator.cs @@ -35,7 +35,6 @@ public class VrSimulator VResolution = 1200, HScreenSize = 0.133793f, VScreenSize = 0.0669f, - VScreenCenter = 0.04678f, EyeToScreenDistance = 0.041f, LensSeparationDistance = 0.07f, InterpupillaryDistance = 0.07f, @@ -188,4 +187,3 @@ public class VrSimulator return 0; } } - diff --git a/Examples/Models/MeshPicking.cs b/Examples/Models/MeshPicking.cs index c0e098a..e2dbceb 100644 --- a/Examples/Models/MeshPicking.cs +++ b/Examples/Models/MeshPicking.cs @@ -99,7 +99,7 @@ public class MeshPicking Color cursorColor = Color.White; // Get ray and test against objects - ray = GetMouseRay(GetMousePosition(), camera); + ray = GetScreenToWorldRay(GetMousePosition(), camera); // Check ray collision aginst ground quad RayCollision groundHitInfo = GetRayCollisionQuad(ray, g0, g1, g2, g3); diff --git a/Examples/Models/ModelLoading.cs b/Examples/Models/ModelLoading.cs index b1b82bd..b714a73 100644 --- a/Examples/Models/ModelLoading.cs +++ b/Examples/Models/ModelLoading.cs @@ -104,7 +104,7 @@ public class ModelLoading if (IsMouseButtonPressed(MouseButton.Left)) { // Check collision between ray and box - if (GetRayCollisionBox(GetMouseRay(GetMousePosition(), camera), bounds).Hit) + if (GetRayCollisionBox(GetScreenToWorldRay(GetMousePosition(), camera), bounds).Hit) { selected = !selected; }