fix examples to build
This commit is contained in:
parent
1a9973bd2a
commit
c7cedabbb3
4 changed files with 4 additions and 7 deletions
|
|
@ -54,7 +54,7 @@ public class Picking3d
|
||||||
{
|
{
|
||||||
if (!collision.Hit)
|
if (!collision.Hit)
|
||||||
{
|
{
|
||||||
ray = GetMouseRay(GetMousePosition(), camera);
|
ray = GetScreenToWorldRay(GetMousePosition(), camera);
|
||||||
|
|
||||||
// Check collision between ray and box
|
// Check collision between ray and box
|
||||||
BoundingBox box = new(
|
BoundingBox box = new(
|
||||||
|
|
@ -68,7 +68,7 @@ public class Picking3d
|
||||||
collision.Hit = false;
|
collision.Hit = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ray = GetMouseRay(GetMousePosition(), camera);
|
ray = GetScreenToWorldRay(GetMousePosition(), camera);
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
@ -119,4 +119,3 @@ public class Picking3d
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,6 @@ public class VrSimulator
|
||||||
VResolution = 1200,
|
VResolution = 1200,
|
||||||
HScreenSize = 0.133793f,
|
HScreenSize = 0.133793f,
|
||||||
VScreenSize = 0.0669f,
|
VScreenSize = 0.0669f,
|
||||||
VScreenCenter = 0.04678f,
|
|
||||||
EyeToScreenDistance = 0.041f,
|
EyeToScreenDistance = 0.041f,
|
||||||
LensSeparationDistance = 0.07f,
|
LensSeparationDistance = 0.07f,
|
||||||
InterpupillaryDistance = 0.07f,
|
InterpupillaryDistance = 0.07f,
|
||||||
|
|
@ -188,4 +187,3 @@ public class VrSimulator
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ public class MeshPicking
|
||||||
Color cursorColor = Color.White;
|
Color cursorColor = Color.White;
|
||||||
|
|
||||||
// Get ray and test against objects
|
// Get ray and test against objects
|
||||||
ray = GetMouseRay(GetMousePosition(), camera);
|
ray = GetScreenToWorldRay(GetMousePosition(), camera);
|
||||||
|
|
||||||
// Check ray collision aginst ground quad
|
// Check ray collision aginst ground quad
|
||||||
RayCollision groundHitInfo = GetRayCollisionQuad(ray, g0, g1, g2, g3);
|
RayCollision groundHitInfo = GetRayCollisionQuad(ray, g0, g1, g2, g3);
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ public class ModelLoading
|
||||||
if (IsMouseButtonPressed(MouseButton.Left))
|
if (IsMouseButtonPressed(MouseButton.Left))
|
||||||
{
|
{
|
||||||
// Check collision between ray and box
|
// Check collision between ray and box
|
||||||
if (GetRayCollisionBox(GetMouseRay(GetMousePosition(), camera), bounds).Hit)
|
if (GetRayCollisionBox(GetScreenToWorldRay(GetMousePosition(), camera), bounds).Hit)
|
||||||
{
|
{
|
||||||
selected = !selected;
|
selected = !selected;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue