<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/ImpulseAction",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation13ImpulseActionV"
  },
  "title" : "ImpulseAction"
}
-->

# ImpulseAction

An action that applies an impulse to the physics body at its center of mass when
played as an animation.

```
struct ImpulseAction
```

## Overview

This action requires a [`CollisionComponent`](/documentation/RealityKit/CollisionComponent) and [`PhysicsBodyComponent`](/documentation/RealityKit/PhysicsBodyComponent) with the
[`mode`](/documentation/RealityKit/PhysicsBodyComponent/mode) set to
[`PhysicsBodyMode.dynamic`](/documentation/RealityKit/PhysicsBodyMode/dynamic).
Without these settings, the impulse has no effect on the entity.

The example below creates an animation which applies an impulse to the entity after five seconds.

```swift
// Create an action to apply an impulse, forcing the object to move upwards.
let impulseAction = ImpulseAction(linearImpulse: [0, 1, 0])

// Create a small positive duration value.
let duration: TimeInterval = 1 / 30.0

// Create an animation for the action, which will start playing
// after five seconds.
let impulseAnimation = try AnimationResource
    .makeActionAnimation(for: impulseAction,
                         duration: duration,
                         delay: 5.0)

// Play the sequence animation that will play the actions.
entity.playAnimation(impulseAnimation)
```

> Important: This action does not directly animate a bound property, such as ``doc://com.apple.RealityKit/documentation/RealityKit/BindTarget/transform``.

> Tip: This action performs instantaneously, consider supplying a small positive duration value when creating the animation.

## Topics

### Initializers

[`init(targetEntity: ActionEntityResolution, linearImpulse: SIMD3<Float>)`](/documentation/RealityKit/ImpulseAction/init(targetEntity:linearImpulse:))

Creates a new impulse action.

### Instance Properties

[`var animatedValueType: (any AnimatableData.Type)?`](/documentation/RealityKit/ImpulseAction/animatedValueType)

The type for the value that the action modifies over time.

[`var linearImpulse: SIMD3<Float>`](/documentation/RealityKit/ImpulseAction/linearImpulse)

An impulse in newton seconds (in physics simulation space).

[`var targetEntity: ActionEntityResolution`](/documentation/RealityKit/ImpulseAction/targetEntity)

The entity that the impulse acts upon.

## Relationships

### Conforms To

[`EntityAction`](/documentation/RealityKit/EntityAction)

[`Encodable`](/documentation/Swift/Encodable)

[`Decodable`](/documentation/Swift/Decodable)

---

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)