PackedVector2Array method: remove_at

Godot Version



I am building a PackedVector2Array to represent detected trees within an area. When the tree leaves the area, I remove its element with remove_at. Lets say I have this array:

var trees_in_range: PackedVector2Array

and the array has 4 elements. ([0,1], [1,2], [2,3], [3,4])

If I use trees_in_range.remove_at(2) , will the end result be:

([0,1], [1,2], [3,4]) array size: 3

or will it be

([0,1], [1,2], , [3,4]) array size: 4

It will be the first.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.