Skip to content
SoulFire LogoSoulFire

Set bot rotation

POST
/v1/instances/{instance_id}/bots/{bot_id}/rotation:set

Sets the bot's view rotation (look direction). Yaw is normalized to -180 to 180, pitch is clamped to -90 to 90. The action is queued and executed on the next game tick.

Authorization

headerAuthorizationBearer <JWT>

Preferred API authentication. Use a JWT with the api audience.

Path Parameters

instance_id*string

The UUID of the SoulFire instance containing the bot.

Formatuuid
bot_id*string

The profile UUID of the bot to rotate.

Formatuuid

Request Body

application/json
  1. body

Request to set the bot's view rotation (look direction). Used to aim the bot's view at specific targets or directions.

yaw*|

Horizontal rotation angle in degrees (yaw). Range: -180 to 180 (values outside this range are normalized). Direction mapping: 0 = South, 90 = West, -90 = East, +/-180 = North.

pitch*|

Vertical rotation angle in degrees (pitch). Range: -90 to 90 (values outside this range are clamped). Direction mapping: -90 = looking up, 0 = horizon, 90 = looking down.

Response Body

Response for rotation update.

application/json
  1. response

Response for rotation update.

success*boolean

Whether the rotation was successfully set.

error?|

Error message if success is false. Possible errors: "Player is not available"

Example Request
curl -X POST 'http://127.0.0.1:38765/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/bots/497f6eca-6276-4993-bfeb-53cbbbba6f08/rotation:set' \
  -H 'Content-Type: application/json' \
  -d '{
  "yaw": 0.1,
  "pitch": 0.1
}'
Example Response
{
  "success": true,
  "error": "string"
}

Was this page helpful?