Skip to contents

Get collision rectangle for two rectangles collision.

Usage

get_collision_rec(rec1, rec2)

Arguments

rec1

A rectangle.

rec2

A rectangle.

Value

A rectangle

Note

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

Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2);

See also

Other rec functions: check_collision_circle_rec(), check_collision_point_rec(), draw_billboard_rec(), draw_rectangle_rec(), draw_texture_rec(), get_glyph_atlas_rec()

Other collision functions: check_collision_box_sphere(), check_collision_boxes(), check_collision_circle_line(), check_collision_circle_rec(), check_collision_circles(), check_collision_point_circle(), check_collision_point_line(), check_collision_point_rec(), check_collision_point_triangle(), check_collision_recs(), check_collision_spheres()

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_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(), 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_collision_rec(rectangle(10, 10, 200, 100), rectangle(10, 10, 200, 100))
#> rectangle(x = 10, y = 10, width = 200, height = 100)