Schemas / Simulation

rig.sim.agent

v1.0.0 · stable maturity: draft 8 fields 2 required

Fields

FieldTypeMeaning
navmesh entity required Entity with rig.sim.navmesh
speed float required Units per second
radius float optional Optional. Clearance. Absent = the host default
goal entity optional Optional. Target. Its transform position is the destination
destination vec3 optional Optional. World point. Ignored when goal is set
height float optional Optional. Agent height. Absent = the host default
stoppingDistance float optional Optional. Distance at which the goal counts as reached; absent = 0
avoidance bool optional Optional. Steer around other agents; absent = false

Walker on a navmesh. Format when present.

Absent goal and destination means idle. The path, neighbour lists, and avoidance horizons stay in the host.

JSON Schema

Resolves at https://rig.works/schemas/rig.sim.agent.schema.json — raw file.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rig.works/schemas/rig.sim.agent.schema.json",
  "title": "rig.sim.agent",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "navmesh": {
      "$ref": "./_defs.schema.json#/$defs/entity"
    },
    "speed": {
      "$ref": "./_defs.schema.json#/$defs/float"
    },
    "radius": {
      "$ref": "./_defs.schema.json#/$defs/float"
    },
    "goal": {
      "$ref": "./_defs.schema.json#/$defs/entity"
    },
    "destination": {
      "$ref": "./_defs.schema.json#/$defs/vec3"
    },
    "height": {
      "$ref": "./_defs.schema.json#/$defs/float"
    },
    "stoppingDistance": {
      "$ref": "./_defs.schema.json#/$defs/float"
    },
    "avoidance": {
      "$ref": "./_defs.schema.json#/$defs/bool"
    }
  },
  "required": [
    "navmesh",
    "speed"
  ],
  "x-rig-maturity": "draft"
}

Seen in

play-scene.json