Skip to contents

Get a ray trace from screen position (i.e mouse).

Usage

get_screen_to_world_ray(position, camera)

Arguments

position

A numeric vector of length 2.

camera

A camera_3d.

Value

A ray

Note

This function has been auto-generated from the following Raylib function definition:

Ray GetScreenToWorldRay(Vector2 position, Camera camera);

See also

Other ray functions: draw_ray(), get_ray_collision_box(), get_ray_collision_mesh(), get_ray_collision_quad(), get_ray_collision_sphere(), get_ray_collision_triangle(), ray()

Other screen functions: get_screen_height(), get_screen_to_world_2d(), get_screen_to_world_ray_ex(), get_screen_width(), get_world_to_screen(), is_cursor_on_screen(), load_image_from_screen(), swap_screen_buffer()

Other get functions: get_application_directory(), get_camera_matrix(), get_camera_matrix_2d(), get_char_pressed(), get_clipboard_image(), get_clipboard_text(), get_codepoint_count(), get_collision_rec(), get_color(), get_current_monitor(), get_directory_file_count(), get_directory_file_count_ex(), get_directory_path(), get_file_extension(), get_file_length(), get_file_mod_time(), get_file_name(), get_file_name_without_ext(), get_font_default(), get_fps(), get_frame_time(), get_gamepad_axis_count(), get_gamepad_axis_movement(), get_gamepad_button_pressed(), get_gamepad_name(), get_gesture_detected(), get_gesture_drag_angle(), get_gesture_drag_vector(), get_gesture_hold_duration(), get_gesture_pinch_angle(), get_gesture_pinch_vector(), get_glyph_atlas_rec(), get_glyph_index(), get_glyph_info(), get_image_alpha_border(), get_image_color(), get_key_name(), get_key_pressed(), get_master_volume(), get_mesh_bounding_box(), get_model_bounding_box(), get_monitor_count(), get_monitor_height(), get_monitor_name(), get_monitor_physical_height(), get_monitor_physical_width(), get_monitor_position(), get_monitor_refresh_rate(), get_monitor_width(), get_mouse_delta(), get_mouse_position(), get_mouse_wheel_move(), get_mouse_wheel_move_v(), get_mouse_x(), get_mouse_y(), get_music_time_length(), get_music_time_played(), get_pixel_data_size(), get_prev_directory_path(), get_random_value(), get_ray_collision_box(), get_ray_collision_mesh(), get_ray_collision_quad(), get_ray_collision_sphere(), get_ray_collision_triangle(), get_render_height(), get_render_width(), get_screen_height(), get_screen_to_world_2d(), get_screen_to_world_ray_ex(), get_screen_width(), get_shader_location(), get_shader_location_attrib(), get_shapes_texture(), get_shapes_texture_rectangle(), get_spline_point_basis(), get_spline_point_bezier_cubic(), get_spline_point_bezier_quad(), get_spline_point_catmull_rom(), get_spline_point_linear(), get_text_between(), get_time(), get_touch_point_count(), get_touch_point_id(), get_touch_position(), get_touch_x(), get_touch_y(), get_window_position(), get_window_scale_dpi(), get_working_directory(), get_world_to_screen(), get_world_to_screen_2d(), get_world_to_screen_ex()

Examples

if (FALSE) {
get_screen_to_world_ray(c(100, 100), camera_3d(c(0, 10, 10)))
}