Steering Wander
Updated
Smooth random roaming.
- Type
comp-steering-wander- Script class
SteeringWanderComponent- Per entity
- Several
- Version
- 1.0.0
Read about it in Steering: what it does, how to use it from a script, and examples.
Properties
Section titled “Properties”The props the runtime declares for this component, with their defaults and accepted ranges.
| Prop | Default | Range |
|---|---|---|
jitter |
0 ≤ x ≤ 10 |
|
range |
2 ≤ x ≤ 1000 |
|
weight |
0 ≤ x ≤ 10 |
Live example
Section titled “Live example”Run it in the browser, read its scripts, and download it as an XR Creator project.
Live example
Show an agent's speedA wandering Steering Agent's velocity is shown as a speed on a Text sign, updated only when the rounded value changes.
Watch the speed change as the agent wanders, speeds up and turns. Drag to orbit the camera, scroll to zoom.
From a script
Section titled “From a script”#pragma lifecycle(startup)
function startup() { const component = self.parent.getComponent(SteeringWanderComponent); if (component) log(component.props);}