Steering Follow Path
Updated
Follow a list of points in order.
- Type
comp-steering-follow-path- Script class
SteeringFollowPathComponent- 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 |
|---|---|---|
points |
||
radius |
0.3 ≤ x ≤ 10 |
|
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
Give an agent a route at runtimeA script turns three landmarks into a Steering Follow Path for a courier; at the last stop the Steering Agent sends arrive, and the round starts again five seconds later.
Watch the amber courier visit the bakery, the fountain and the library in order; at the library the log reports the round, and the next one starts after five seconds. 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(SteeringFollowPathComponent); if (component) log(component.props);}