Skip to content

Motion Path Controller

Updated

Moves the entity along a spline: a fly-through, a platform, a patrol.

Type
comp-motion-path-controller
Script class
MotionPathControllerComponent
Per entity
One
Version
2.1.0

Read about it in Camera controllers: what it does, how to use it from a script, and examples.

The props the runtime declares for this component, with their defaults and accepted ranges.

Prop Default Range
duration 0 ≤ x ≤ 3600
lookTarget
points
tension -10 ≤ x ≤ 10

Sent to the entity’s Signal Emitter as { entityId, eventType, data }. Compare eventType with the EventType constants.

  • MotionPathController::end

Run it in the browser, read its scripts, and download it as an XR Creator project.

#pragma lifecycle(startup)
function startup() {
const component = self.parent.getComponent(MotionPathControllerComponent);
if (component) log(component.props);
}