Advertisement
ulfben

draw triangle poly

Feb 20th, 2025
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. void render() const noexcept{
  2.    Vector2 dir = (Vector2Length(velocity) != 0) ? Vector2Normalize(velocity) : Vector2{1, 0};
  3.    float degAngle = std::atan2(dir.y, dir.x) * TO_DEG;
  4.    DrawPoly(position, 3, globalConfig.size, degAngle, globalConfig.color);
  5.    //DrawCircle(static_cast<int>(position.x), static_cast<int>(position.y), 1, BLACK);
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement