Returning a vector2 from a PackedVector2

Godot Version



From the documentation on PackedVector2Array:

[Vector2] operator ( [int])

Returns the [Vector2] at index index. Negative indices can be used to access the elements starting from the end. Using index out of array’s bounds will result in an error.

How do I actually use this operator on a PackedVector2Array? Say my array is named: lots_of_vectors. How would I access (for example) index 3’s vector2 using the above operator?

Thank you for your time


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