---
title: "sampleFields(at:)"
framework: spritekit
role: symbol
role_heading: Instance Method
path: "spritekit/skphysicsworld/samplefields(at:)"
---

# sampleFields(at:)

Samples all of the field nodes in the scene and returns the summation of their forces at that point.

## Declaration

```swift
func sampleFields(at position: vector_float3) -> vector_float3
```

## Parameters

- `position`: A position in scene coordinates.

## Return Value

Return Value The summation of forces exerted on that point.

## Discussion

Discussion The sample is calculated as if a physics body is placed at that position in the scene. The body is assumed to have a mass of 1.0, with no charge or velocity. The body is affected by all field nodes.
