<!--
{
  "availability" : [
    "Reality Composer Pro: -",
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "ComputeGraph",
  "identifier" : "/documentation/ComputeGraph/MouseParams",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Compute Graph"
    ],
    "preciseIdentifier" : "c:@S@MouseParams"
  },
  "title" : "MouseParams"
}
-->

# MouseParams

Parameters describing mouse interaction in 3D space.

```
struct MouseParams
```

## Overview

This structure captures both the position and direction of a mouse cursor
projected into 3D coordinates, commonly used for ray casting or spatial interactions.

## Topics

### Initializers

[`init()`](/documentation/ComputeGraph/MouseParams/init())

[`init(position: simd_float3, direction: simd_float3, has_value: Bool)`](/documentation/ComputeGraph/MouseParams/init(position:direction:has_value:))

### Instance Properties

[`var direction: simd_float3`](/documentation/ComputeGraph/MouseParams/direction)

The normalized direction vector of the mouse ray, converted to the
simulation’s coordinate system.

[`var has_value: Bool`](/documentation/ComputeGraph/MouseParams/has_value)

Indicates whether valid mouse parameters are available.

[`var position: simd_float3`](/documentation/ComputeGraph/MouseParams/position)

The 3D position of the mouse cursor in local space, converted to the
simulation’s coordinate system.

## Relationships

### Conforms To

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

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

---

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)