Fixed error for vision cone

This commit is contained in:
MaddoScientisto 2025-12-30 22:04:54 +01:00
commit c52013d0eb

View file

@ -23,6 +23,12 @@ var pending_resize := false
# Update size to initial state
func _init() -> void:
points = PackedVector3Array([
Vector3(0, 0, 0),
Vector3(0.01, 0, 0),
Vector3(0, 0.01, 0),
Vector3(0, 0, 0.01),
])
_request_resize()
# Will only resize once per frame, during idle time
@ -47,4 +53,4 @@ func _make_cone_polygon_points() -> PackedVector3Array:
var y := sin(angle) * radius
pts.push_back(Vector3(x, -height/2, y))
pts.push_back(top)
return pts
return pts