Tangent fix (#43)

* Fixed tangent mis calculation

* fixed possible error null reference
This commit is contained in:
2025-05-26 14:48:14 +02:00
committed by GitHub
parent cae2c7edb3
commit 74e7d1ca7a
2 changed files with 9 additions and 0 deletions
@@ -222,6 +222,7 @@ function BattleManager:GetRandomPoint(origin, groups)
local hulls = Spearhead.Util.getSeparatedConvexHulls(points, 50)
local hull = Spearhead.Util.randomFromList(hulls) --[[@as Array<Vec2>]]
if not hull then return nil end
local enlargedHull = Spearhead.Util.enlargeConvexHull(hull, 25)
local shootPoints = Spearhead.Util.GetTangentHullPointsFromOrigin(enlargedHull, origin)