set_transform
Updates an O3DE entity's world position, rotation, or scale while changing only the transform components you provide.
Instructions
Set the world transform of an entity (only provided components are changed).
rotation is an [x, y, z, w] quaternion and scale an
[x, y, z] vector, the effective scale to end up with (each element in
(0, 1000]). The call goes to the AiCompanion gem's native
set_transform request (works in secure mode) and returns the updated
entity's JSON, the same shape as get_entity. The gem refuses an
unknown entity or out-of-bounds values, and that is returned as an error.
On gem API 0.5.0 and later (gem 0.6.0) the quaternion and the scale are
sent as is. A non-uniform scale is applied through the engine's
Non-uniform Scale component (each element at least 0.01); an O3DE
Transform itself holds only a uniform scale. A later uniform scale sets
that component back to 1. The reply carries scale (uniform),
non_uniform_scale and effective_scale.
On older gems the quaternion is converted to XYZ Euler degrees, a
rotation at a gimbal pole (pitch within 0.02 degrees of plus or minus 90)
goes through editor Python instead, which prints
Transform set for entity [<id>], and a non-uniform scale is refused
with non_uniform_scale_unsupported. The legacy transport also uses
the editor-Python path. An all-zero quaternion is rejected before any path.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"entity_id": "<entity_id>"
},
"name": "set_transform"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scale | No | ||
| position | No | ||
| rotation | No | ||
| entity_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |