Skip to main content
POST
/
entities
/
{id}
/
components
add/update components on an entity
curl --request POST \
  --url http://localhost:3917/entities/{id}/components \
  --header 'Content-Type: application/json' \
  --data '
{
  "agent_id": 1,
  "collider": {
    "hx": 123,
    "hy": 123,
    "hz": 123,
    "shape": "Aabb"
  },
  "color": "<string>",
  "physics_body": "<string>",
  "transform": {
    "position": [
      123
    ],
    "rotation": [
      123
    ],
    "scale": [
      123
    ]
  },
  "velocity": {
    "linear": [
      123
    ],
    "angular": [
      123
    ]
  }
}
'
{
  "ok": true,
  "message": "<string>"
}

Path Parameters

id
integer<int32>
required

Entity id

Required range: x >= 0

Body

application/json
agent_id
integer<int32> | null
Required range: x >= 0
collider
object
color
string | null
physics_body
string | null
transform
object
velocity
object

Response

200 - application/json

Components applied.

ok
boolean
required
message
string | null