Created
August 1, 2023 21:25
-
-
Save Be1zebub/1e0bbb8d227c7df6803431447d686971 to your computer and use it in GitHub Desktop.
math.BezierLerp.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 points = { | |
Vector( 128, 128 ), | |
Vector( 384, 128 ), | |
Vector( 128, 384 ) | |
} | |
hook.Add( "HUDPaint", "math.BezierLerp", function() | |
local frac = RealTime() % 1 | |
local point = math.BezierLerp( frac, points ) | |
surface.SetDrawColor( 255, 255, 0 ) | |
surface.DrawRect( point.x - 4, point.y - 4, 8, 8 ) | |
end ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment