Created
August 1, 2023 21:26
-
-
Save Be1zebub/d9154bbf10668802bb89708532791b6c to your computer and use it in GitHub Desktop.
math.BezierSpline.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local spline = math.BezierSpline( { | |
Vector( 128, 128 ), | |
Vector( 384, 128 ), | |
Vector( 128, 384 ) | |
} ) | |
hook.Add( "HUDPaint", "math.BezierSpline", function() | |
surface.SetDrawColor(255, 255, 0) | |
for i = 1, #spline - 1 do | |
local pos = spline[i] | |
local pos2 = spline[i + 1] | |
surface.DrawLine(pos.x, pos.y, pos2.x, pos2.y) | |
end | |
end ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment