attach
Attaches any entity to the player.
Syntax
player.attach(entity, options);
Parameters
Name | Type | Description |
---|---|---|
entity | EntityManager | Entity to attach. |
options (optional) | EntityAttachOptions | Attach options. |
Example
const box = engine.objects.create('box');
player.attach(box);
Available on: Client Server