Skip to content

Handle

Updated

Drag the entity to move, rotate or scale it within limits.

Type
comp-handle
Script class
HandleComponent
Per entity
One
Version
1.0.0

Read about it in Handles: 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
rotate
translate

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

  • Handle::start
  • Handle::end
  • Handle::hover
  • Handle::leave

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(HandleComponent);
if (component) log(component.props);
}