diff options
Diffstat (limited to 'examples/ray_box_cells/main.lua')
| -rw-r--r-- | examples/ray_box_cells/main.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/ray_box_cells/main.lua b/examples/ray_box_cells/main.lua index 5fb49ec..ef6cde4 100644 --- a/examples/ray_box_cells/main.lua +++ b/examples/ray_box_cells/main.lua @@ -61,7 +61,7 @@ function RL.update( delta ) -- Raycast. if not guiMouseHover and RL.IsMouseButtonPressed( RL.MOUSE_BUTTON_LEFT ) then - ray = RL.GetMouseRay( RL.GetMousePosition(), camera.camera ) + ray = RL.GetScreenToWorldRay( RL.GetMousePosition(), camera.camera ) rayCol = box:getRayCollisionMAS( ray ) cells, exitPoint = RL.GetRayBoxCells( ray, box:maxToPos(), cellSize ) |
