+ char text_buffer[256];
+
+ if (camera_fill_rect(
+ camera,
+ rigid_bodies->bodies[id],
+ color) < 0) {
+ return -1;
+ }
+
+ snprintf(text_buffer, 256, "id: %zd", id);
+
+ if (camera_render_debug_text(
+ camera,
+ text_buffer,
+ vec(rigid_bodies->bodies[id].x,
+ rigid_bodies->bodies[id].y)) < 0) {
+ return -1;
+ }
+
+ snprintf(text_buffer, 256, "p:(%.2f, %.2f)",
+ rigid_bodies->bodies[id].x,
+ rigid_bodies->bodies[id].y);
+ if (camera_render_debug_text(
+ camera,
+ text_buffer,
+ vec(rigid_bodies->bodies[id].x,
+ rigid_bodies->bodies[id].y + FONT_CHAR_HEIGHT * 2.0f))) {
+ return -1;
+ }
+
+ snprintf(text_buffer, 256, "v:(%.2f, %.2f)",
+ rigid_bodies->velocities[id].x,
+ rigid_bodies->velocities[id].y);
+ if (camera_render_debug_text(
+ camera,
+ text_buffer,
+ vec(rigid_bodies->bodies[id].x,
+ rigid_bodies->bodies[id].y + FONT_CHAR_HEIGHT * 4.0f))) {
+ return -1;
+ }
+
+ snprintf(text_buffer, 256, "m:(%.2f, %.2f)",
+ rigid_bodies->movements[id].x,
+ rigid_bodies->movements[id].y);
+ if (camera_render_debug_text(
+ camera,
+ text_buffer,
+ vec(rigid_bodies->bodies[id].x,
+ rigid_bodies->bodies[id].y + FONT_CHAR_HEIGHT * 6.0f))) {
+ return -1;