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

# module::setVelocity

Sets the velocity of an element to the specified value.

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

## Parameters

`velocity`

The new velocity vector

## Discussion

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

> Visual: ![Graph](module__setVelocity)

---

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)