Get a ray trace from the screen position (i.e mouse) within a specific section of the screen
cam = {position:[0,5,10], target:[0,0,0], up:[0,1,0], fovy:45, projection:raylib.CAMERA_PERSPECTIVE} // Cast a ray from a specific viewport section (800x600) ray = raylib.GetScreenToWorldRayEx([400, 300], cam, 800, 600) print "Ray direction: " + ray.direction[0] + ", " + ray.direction[1] + ", " + ray.direction[2]
There was an error while loading. Please reload this page.