@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / components / FaceAttachmentComponent
Class: FaceAttachmentComponent ​
Defined in: components/FaceAttachment.ts:74
Fixes an entity to a place on its parent FaceHeadComponent: glasses to the bridge of the nose, a hat to the top of the head.
The entity's ParentId stays the head; this names the place. The ObjectManagementSystem hangs the entity's object under a socket at that place, so its Transform is its offset FROM the place, in head units. The same thing happens in the editor and at runtime, except that at runtime the place is measured on the person in front of the camera.
Attach and detach with ObjectManagementSystem.attachToFace / detachFromFace.
Extends ​
Constructors ​
Constructor ​
ts
new FaceAttachmentComponent(options?): FaceAttachmentComponent;Defined in: components/FaceAttachment.ts:82
Parameters ​
| Parameter | Type |
|---|---|
options? | FaceAttachmentOptions |
Returns ​
FaceAttachmentComponent
Overrides ​
Properties ​
| Property | Type | Description | Defined in |
|---|---|---|---|
point | FaceAttachPointId | The place on the head. | components/FaceAttachment.ts:76 |
followExpression | boolean | null | Follow expression (true, false), or null for what suits the place. | components/FaceAttachment.ts:78 |
enabled | boolean | Whether it follows the place. Off: an ordinary child of the head. | components/FaceAttachment.ts:80 |

