<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SpriteKit",
  "identifier" : "/documentation/SpriteKit/SKAction/changeCharge(to:duration:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SpriteKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SKAction(cm)changeChargeTo:duration:"
  },
  "title" : "changeCharge(to:duration:)"
}
-->

# changeCharge(to:duration:)

Creates an action that changes the charge of a node’s physics body to a new value.

```
class func changeCharge(to v: Float, duration: TimeInterval) -> SKAction
```

## Parameters

`v`

The new charge of the physics body.

`duration`

The duration of the animation.

## Return Value

A new action object.

## Discussion

When the action executes, the physics body’s [`charge`](/documentation/SpriteKit/SKPhysicsBody/charge) property animates from its current value to its new value.

This action is not reversible.

---

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)