From ab463e1caa89045909f0c705bd8afd1f490371ec Mon Sep 17 00:00:00 2001 From: Orange++ Date: Mon, 25 Aug 2025 16:00:36 +0300 Subject: [PATCH] Update README.md --- README.md | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 21ae56a..f8fac40 100644 --- a/README.md +++ b/README.md @@ -56,14 +56,25 @@ Oranges's Math Library (omath) is a comprehensive, open-source library aimed at Please read our [installation guide](https://github.com/orange-cpp/omath/blob/main/INSTALL.md). If this link doesn't work check out INSTALL.md file. ## ❔ Usage -Simple world to screen function +ESP example ```c++ -TEST(UnitTestProjection, IsPointOnScreen) -{ - const omath::projection::Camera camera({0.f, 0.f, 0.f}, {0, 0.f, 0.f} , {1920.f, 1080.f}, 110.f, 0.1f, 500.f); +omath::source_engine::Camera cam{localPlayer.GetCameraOrigin(), + localPlayer.GetAimPunch(), + {1920.f, 1080.f}, + localPlayer.GetFieldOfView(), + 0.01.f, 30000.f}; - const auto proj = camera.WorldToScreen({100, 0, 15}); - EXPECT_TRUE(proj.has_value()); +std::optional> target_to_aim = std::nullopt; +for (auto ent: apex_sdk::EntityList::GetAllEntities()) +{ + const auto bottom = cam.world_to_screen(ent.GetOrigin()); + const auto top = cam.world_to_screen(ent.GetBonePosition(8) + omath::Vector3{0, 0, 10}); + + const auto ent_health = ent.GetHealth(); + + if (!top || !bottom || ent_health <= 0) + continue; + // esp rendering... } ``` ## Showcase