---
title: orient_to_velocity
framework: ComputeGraph
role: symbol
role_heading: Function
platforms: [iOS 27.0+, iPadOS 27.0+, macOS 27.0+, tvOS 27.0+, visionOS 27.0+]
path: computegraph/orient_to_velocity
---

# orient_to_velocity

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

## Declaration

```swift
void orient_to_velocity()
```

## Discussion

Discussion Adding this node will cause a float3 axisY attribute to be added, if one doesn’t already exist. note:  note: Reads from element state float3 velocity, if it exists note: Writes to element state float3 axisY

## See Also

### Utility nodes

- [graph](computegraph/graph.md)
- [group](computegraph/group.md)
- [texture](computegraph/texture.md)
- [random](computegraph/random.md)
- [matrix4x4f](computegraph/matrix4x4f.md)
- [matrix4x4h](computegraph/matrix4x4h.md)
- [viewpoint](computegraph/viewpoint-swift.func.md)
- [element_integrate](computegraph/element_integrate.md)
- [texture_sample](computegraph/texture_sample.md)
- [texture_sample1d](computegraph/texture_sample1d.md)
- [gridDebugCells](computegraph/griddebugcells.md)
- [gridFromPoints](computegraph/gridfrompoints.md)
- [spawn_demo](computegraph/spawn_demo.md)
