-
Автор темы
- #1
render arc function
the actual math bit (not really)
runthis on your entity loops
SS:
C++:
void arc (float x, float y, float radius, float min_angle, float max_angle, Color col, float thickness) {
draw_list-> PathArcTo (ImVec2 (x, y), radius, DEG2RAD (min_angle), DEG2RAD (max_angle), 32);
draw_list-> PathStroke (GetU32 (col), false, thickness);
}
runthis on your entity loops
C++:
float width = 5.f;
QAngle viewangles;
g_EngineClient-> get_view_angles (& viewangles);
auto angle = viewangles.yaw - Math :: CalcAngle (g_LocalPlayer-> get_eye_pos (), player-> get) abs_origin ()). yaw - 90;
render :: arc (globals.width / 2, globals.height / 2, 256, angle - width, angle + width, Color (1.f, 1.f, 1.f, 1.f), 4.f) ;
render :: arc (globals.width / 2, globals.height / 2, 250, angle - width, angle + width, Color (1.f, 1.f, 1.f, 0.5f), 1.5f);
Последнее редактирование: