How to define a "PoolIntArray polygon"?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Luis Morao

Specifically I want to NavigationMesh.add_polygon() (more like exclude a polygon…) using the documentation function. It says it needs to take a polygon defined as a PoolIntArray. I am not understanding how can you define a 3D polygon with an array of ints.

I got the vertices by going to the collisionShape.get_shape().get_extents() and converting these extents into vertices (the Shape is a cube).

I have the 3D vertices of the cube as an array of Vector3. How do I convert these vertices to the PoolIntArray as required?

Should I be doing this in a different way?

PS.: I’ve looked in 2d and there it allows both PoolVector2Array and PoolIntArray link