---
title: "module::setVelocity"
framework: Compute Graph
role: symbol
role_heading: Function
platforms: [iOS 27.0+, iPadOS 27.0+, macOS 27.0+, tvOS 27.0+, visionOS 27.0+]
path: computegraph/module/setvelocity
---

# module::setVelocity

Sets the velocity of an element to the specified value.

## Declaration

```swift
void module::setVelocity(float3 velocity)
```

## Parameters

- `velocity`: The new velocity vector

## Discussion

Discussion Use this function to assign a new velocity vector to an element, replacing its current velocity. note:
