entity.scan_characters
Overview
- Scans nearby characters relative to camera/pawn direction. Returns angle, direction label, and distance.
Metadata
| Field | Value |
|---|---|
| Display | Scan Characters |
| Category | entity |
| Access | Public |
| Scope | B1Standalone |
| Tags | — |
| Aliases | — |
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| radius | float | no | — | Search radius in meters (default 100, max 1000) |
| direction | string | no | — | Direction filter: front/behind/left/right/all (default all) |
| cone | float | no | — | Cone half-angle in degrees (default 90) |
| sort | string | no | — | Sort by: distance/angle (default distance) |
| ref | string | no | — | Reference direction: camera/pawn (default camera) |
| limit | int | no | — | Max results (default 20, max 100) |
Returns
Returns a JSON object with the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
ref | string | yes | Reference direction used (camera/pawn) |
radius | float | yes | Search radius in meters |
count | int | yes | Number of characters returned |
characters | array | yes | Nearby characters |
characters[].entity_id | entityId | yes | Character entity id |
characters[].first_name | string | yes | First name |
characters[].last_name | string | yes | Last name |
characters[].gender | string | yes | Gender enum name (Male/Female) |
characters[].gender_text | string | yes | Localized gender label |
characters[].age_group | string | yes | Growth step name |
characters[].age_group_text | string | yes | Localized age group label |
characters[].portrait_url | string | yes | Cached portrait url |
characters[].distance | float | yes | Distance in meters |
characters[].angle | float | yes | Signed angle in degrees (-left/+right) |
characters[].direction | string | yes | Direction label (front/behind/left/right) |
Usage
await inzoi.cli.execute('entity.scan_characters', {
radius: 0.0, // optional
direction: '', // optional
cone: 0.0, // optional
sort: '', // optional
ref: '', // optional
limit: 0, // optional
});