Skip to contents

Get collision info between ray and box.

Usage

get_ray_collision_box(ray, box)

Arguments

ray

A ray.

box

A bounding_box.

Value

A ray_collision

Note

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

RayCollision GetRayCollisionBox(Ray ray, BoundingBox box);

See also

Other box functions: draw_bounding_box(), get_mesh_bounding_box(), get_model_bounding_box()

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

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_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(), 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

get_ray_collision_box(ray(c(0, 0, 0), c(0, 0, 1)), bounding_box(c(-1, -1, -1), c(1, 1, 1)))
#> ray_collision(hit = TRUE, distance = 1, point = 0, 0, 1, normal = 0, 0, -1)