<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/ComputeGraphViewpointComponent",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit",
      "ComputeGraph"
    ],
    "preciseIdentifier" : "s:24_RealityKit_ComputeGraph0cD18ViewpointComponentV"
  },
  "title" : "ComputeGraphViewpointComponent"
}
-->

# ComputeGraphViewpointComponent

A transient component that provides camera viewpoint information to the particle simulation.

```
struct ComputeGraphViewpointComponent
```

## Overview

Attach this component to an entity to supply the simulation with an observer’s
position and direction. The simulation uses these values for view-dependent
effects such as billboard orientation or camera-facing particles.

Both properties are optional. When `nil`, the simulation falls back to its
default viewpoint behavior.

## Topics

### Initializers

[`init()`](/documentation/RealityKit/ComputeGraphViewpointComponent/init())

### Instance Properties

[`var viewDirection: SIMD3<Float>?`](/documentation/RealityKit/ComputeGraphViewpointComponent/viewDirection)

The direction the observer is facing, in world space.

[`var viewPosition: SIMD3<Float>?`](/documentation/RealityKit/ComputeGraphViewpointComponent/viewPosition)

The position of the observer, in world space.

## Relationships

### Conforms To

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

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

---

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)