<!--
{
  "availability" : [
    "Reality Composer Pro: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "ComputeGraph",
  "identifier" : "/documentation/ComputeGraph/orient_to_velocity",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Compute Graph"
    ],
    "preciseIdentifier" : "orient_to_velocity"
  },
  "title" : "orient_to_velocity"
}
-->

# orient_to_velocity

Orient the particle by setting its `axisY` to the velocity’s current direction.

```
void orient_to_velocity()
```

## Discussion

Adding this node will cause a `float3 axisY` attribute to be added, if one doesn’t already exist.

> Visual: ![Graph](orient_to_velocity)

> Note: Reads from element state `float3 velocity`, if it exists

> Note: Writes to element state `float3 axisY`

---

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)