---
title: "float2(at:)"
framework: gameplaykit
role: symbol
role_heading: Instance Method
path: "gameplaykit/gkpath/float2(at:)"
---

# float2(at:)

Returns the 2D point at the specified index in the path’s list of vertices.

## Declaration

```swift
func float2(at index: Int) -> vector_float2
```

## Parameters

- `index`: The index of the vertex to return, between 0 and the doc://com.apple.gameplaykit/documentation/GameplayKit/GKPath/numPoints value.

## Return Value

Return Value The vertex at the specified index.

## Discussion

Discussion You define a path’s vertices when creating it, either directly with the initWithFloat3Points:count:radius:cyclical: initializer or indirectly with the init(graphNodes:radius:) initializer. If the path is a 3D path, this method is still functional but returns only 2D vectors, ignoring the z-component of each point on the path.

## See Also

### Inspecting a Path’s Shape

- [numPoints](gameplaykit/gkpath/numpoints.md)
- [float3(at:)](gameplaykit/gkpath/float3(at:).md)
- [point(at:)](gameplaykit/gkpath/point(at:).md)
