Files
aego/tests/agent/testdata/schema_show_body2d.json
2026-10-20 18:13:57 +03:00

128 lines
3.4 KiB
JSON

{
"ok": true,
"value": {
"name": "physics.Body2D",
"kind": "component",
"display": "Rigid Body 2D",
"category": "Physics",
"owner": "physics",
"doc": "Simulates the node as a rigid body. Colliders on the node and its children form its shape.",
"fields": [
{
"name": "type",
"kind": "enum",
"enum": [
"static",
"kinematic",
"dynamic"
],
"default": "dynamic",
"saved": true,
"doc": "static never moves, kinematic moves by velocity, dynamic reacts to forces and contacts."
},
{
"name": "massMode",
"kind": "enum",
"enum": [
"auto",
"override"
],
"default": "auto",
"saved": true,
"doc": "auto takes the mass from collider density, override uses Mass."
},
{
"name": "gravityScale",
"kind": "float32",
"default": "1",
"saved": true,
"doc": "Multiplier of the project gravity for this body."
},
{
"name": "linearDamping",
"kind": "float32",
"min": 0,
"default": "0",
"saved": true,
"doc": "Slows the movement every step, like air resistance; 0 keeps the speed."
},
{
"name": "angularDamping",
"kind": "float32",
"min": 0,
"default": "0",
"saved": true,
"doc": "Slows the rotation every step; 0 keeps spinning."
},
{
"name": "fixedRotation",
"kind": "bool",
"default": "false",
"saved": true,
"doc": "Keeps the body upright: contacts and torque never rotate it."
},
{
"name": "bullet",
"kind": "bool",
"default": "false",
"saved": true,
"doc": "Continuous collision against other dynamic bodies, so a fast body cannot pass through them. Costs more."
},
{
"name": "allowSleep",
"kind": "bool",
"default": "true",
"saved": true,
"doc": "Lets the body sleep after it comes to rest, which saves time; contacts and scripts wake it."
},
{
"name": "interpolate",
"kind": "bool",
"default": "false",
"saved": true,
"doc": "Draws the body between physics steps for smooth motion; scripts still see the exact pose."
},
{
"name": "layer",
"kind": "int32",
"min": 0,
"max": 31,
"default": "0",
"saved": true,
"doc": "Collision layer, see Project Settings → Physics."
},
{
"name": "mask",
"kind": "int64",
"default": "-1",
"saved": true,
"doc": "Layers this body collides with."
},
{
"name": "velocity",
"kind": "vec2",
"default": "[0, 0]",
"readOnly": true,
"saved": false,
"doc": "Current velocity in units per second, during Play."
},
{
"name": "angularVelocity",
"kind": "float32",
"default": "0",
"readOnly": true,
"saved": false,
"doc": "Current rotation speed in radians per second, during Play."
},
{
"name": "awake",
"kind": "bool",
"default": "false",
"readOnly": true,
"saved": false,
"doc": "Whether the body is simulated this step or sleeping, during Play."
}
]
}
}