<!--
{
  "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/GKNoise/displaceWithNoises(x:y:z:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameplayKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKNoise(im)displaceXWithNoise:yWithNoise:zWithNoise:"
  },
  "title" : "displaceWithNoises(x:y:z:)"
}
-->

# displaceWithNoises(x:y:z:)

Replaces values in the noise field by shifting each value along a vector whose x-, y-, and z-components are based on the specified noise objects.

```
func displaceWithNoises(x xDisplacementNoise: GKNoise, y yDisplacementNoise: GKNoise, z zDisplacementNoise: GKNoise)
```

## Parameters

`xDisplacementNoise`

A noise object whose values determine the x-component of distortion applied to each value in this noise field.

`yDisplacementNoise`

A noise object whose values determine the y-component of distortion applied to each value in this noise field.

`zDisplacementNoise`

A noise object whose values determine the z-component of distortion applied to each value in this noise field.

## Discussion

For each position in the noise field, this method first constructs a vector by sampling from the same position in the `xDisplacementNoise`, `yDisplacementNoise`, and `zDisplacementNoise` noise objects. Then this method uses that vector to shift the location of the noise value at that position. By applying different types of noise to each parameter, you can create different kinds of distortion effects. For example, passing [`GKCylindersNoiseSource`](/documentation/GameplayKit/GKCylindersNoiseSource) output to one parameter and [`GKConstantNoiseSource`](/documentation/GameplayKit/GKConstantNoiseSource) to the other two, you can add horizontal, vertical, or transverse waves to the noise.

![](images/com.apple.gameplaykit/media-2556416@2x.png)

---

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)