---
title: "setValue(_:)"
framework: gamecontroller
role: symbol
role_heading: Instance Method
path: "gamecontroller/gccontrollerbuttoninput/setvalue(_:)"
---

# setValue(_:)

Sets the pressure value of a snapshot of a button.

## Declaration

```swift
func setValue(_ value: Float)
```

## Parameters

- `value`: A normalized number between 0.0 (minimum pressure) and 1.0 (maximum pressure).

## Discussion

Discussion This method does nothing if the associated controller isn’t a snapshot (its isSnapshot property is false).
