Hi, im trying to find position of end angle in range but idk how to do it
Here my code :
local range = 30
function inAngle(at, target, angle)
local Vector = (target- at.Position).Unit * Vector3.new(1, 0, 1)
local nAngle = math.deg(Vector3.xAxis:Angle(Vector, Vector3.xAxis))
return nAngle <= angle, nAngle -- return isInAngle, Angle
end
Blue is “at” Position
Red is “target” Position
Green circle is “end angle” Position i want to find