<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameplayKit",
  "identifier" : "/documentation/GameplayKit/GKNoiseMap/value(at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameplayKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKNoiseMap(im)valueAtPosition:"
  },
  "title" : "value(at:)"
}
-->

# value(at:)

Returns the value at the specified position in the noise map’s discrete sample grid.

```
func value(at position: vector_int2) -> Float
```

## Parameters

`position`

The position to query in the noise map’s grid of sampled noise values. Must be within the rectangle from `[0, 0]` to the noise map’s [`sampleCount`](/documentation/GameplayKit/GKNoiseMap/sampleCount) value.

## Return Value

The value at the specified position.

## Discussion

When you create a noise map from a [`GKNoise`](/documentation/GameplayKit/GKNoise) object, GameplayKit performs the noise generation and processing computations necessary to fill a discrete grid with noise samples. (You specify the size of the grid and its number of samples in the [`init(_:size:origin:sampleCount:seamless:)`](/documentation/GameplayKit/GKNoiseMap/init(_:size:origin:sampleCount:seamless:)) initializer.) Use this method to get sample values from that grid.

You can also use the [`interpolatedValue(at:)`](/documentation/GameplayKit/GKNoiseMap/interpolatedValue(at:)) method to query positions that are not on the discrete integer grid of samples.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)