now also displaying force in debug display

This commit is contained in:
Sara 2023-10-19 13:50:58 +02:00
parent 092e8670cd
commit 169fd63d9e

View file

@ -18,4 +18,8 @@ void physics_entity_debug_draw(PhysicsEntity self) {
rhs = camera_world_to_pixel_point(&g_camera, rhs);
SDL_SetRenderDrawColor(g_renderer, 0, 255, 0, 255);
SDL_RenderDrawLine(g_renderer, lhs.x, lhs.y, rhs.x, rhs.y);
rhs = camera_world_to_pixel_point(&g_camera, vaddf(transform->position, rigidbody_get_force(body)));
SDL_SetRenderDrawColor(g_renderer, 0, 255, 255, 255);
SDL_RenderDrawLine(g_renderer, lhs.x, lhs.y, rhs.x, rhs.y);
}