attach
Attaches any entity to the object.
Syntax
object.attach(entity, options);
Parameters
Name | Type | Description |
---|---|---|
entity | EntityManager | Entity to attach. |
options (optional) | EntityAttachOptions | Attach options. |
Example
const box1 = engine.objects.create('box');
const box2 = engine.objects.create('box', {position: [0, 1, 0]});
box1.attach(box2);
Available on: Client Server