Skip to content
lsl.devlsl.devLSL Dev

Constants in the CharacterParam enum.

All constant groups

At a glance, from the LSL definitions
// Speed and turningCHARACTER_DESIRED_SPEED, float speed  // m/s, 0.2 to 40.0; default 6CHARACTER_MAX_SPEED, float max_speed  // 1 to 40.0; default 20CHARACTER_MAX_ACCEL, float acceleration  // 0.5 to 40.0; default 20CHARACTER_MAX_DECEL, float deceleration  // 0.5 to 60.0; default 30CHARACTER_DESIRED_TURN_SPEED, float speed  // 0.02 to 40.0; default 6; loosely enforcedCHARACTER_MAX_TURN_RADIUS, float radius  // 0.1 to 10.0; default 1.25// Size and shapeCHARACTER_RADIUS, float radius  // capsule, 0.125 to 5.0CHARACTER_LENGTH, float length  // capsule, up to 10.0; at least 2 × radius + 0.1CHARACTER_ORIENTATION, integer  // VERTICAL (default) or HORIZONTAL// Terrain and avoidanceCHARACTER_TYPE, integer  // CHARACTER_TYPE_*; default _NONETRAVERSAL_TYPE, integer  // TRAVERSAL_TYPE_*; default _SLOW; needs CHARACTER_TYPECHARACTER_AVOIDANCE_MODE, integer  // AVOID_* flags; default AVOID_CHARACTERS | AVOID_DYNAMIC_OBSTACLESCHARACTER_STAY_WITHIN_PARCEL, integer  // boolean; TRUE keeps it on its parcelCHARACTER_ACCOUNT_FOR_SKIPPED_FRAMES, integer  // boolean; default TRUE

Constants

Speed and turning

ConstantTypeValueDescription
CHARACTER_DESIRED_SPEEDinteger1Constant used to indicate that the following argument is the desired speed (or speed of pursuit in meters per second) for a pathfinding character.
CHARACTER_MAX_SPEEDinteger13Specifies the character's maximum speed (must be between 0.2 and 50 meters/second; default is 20 m/s). Affects speed when avoiding dynamic obstacles and when traversing low-walkability objects in TRAVERSAL_TYPE_FAST mode.
CHARACTER_MAX_ACCELinteger8Specifies the character's maximum acceleration rate (default is 20 m/s²).
CHARACTER_MAX_DECELinteger9Specifies the character's maximum deceleration rate (default is 30 m/s²).
CHARACTER_DESIRED_TURN_SPEEDinteger12Specifies the character's maximum speed while turning about the Z-axis (default is 6 meters/second). Note that this is only loosely enforced, and a character may turn at higher speeds under certain conditions.
CHARACTER_MAX_TURN_RADIUSinteger10Specifies the character's turn radius when traveling at CHARACTER_DESIRED_TURN_SPEED (default is 1.25 meters).

Size and shape

ConstantTypeValueDescription
CHARACTER_RADIUSinteger2Sets the collision capsule radius used to define the size of a pathfinding character.
CHARACTER_LENGTHinteger3Sets the collision capsule length for a pathfinding character. If the value is less than twice the radius plus 0.1m, it automatically adjusts to twice the radius plus 0.1m.
CHARACTER_ORIENTATIONinteger4Specifies the orientation of the collision capsule for a pathfinding character to denote how to interpret its size. Valid options are VERTICAL and HORIZONTAL.

Terrain and avoidance

ConstantTypeValueDescription
CHARACTER_TYPEinteger6Specifies the preferred surface and terrain terrain-type for the character (default is CHARACTER_TYPE_NONE). Used to describe preferred surfaces rather than behavior (e.g., cows prefer type B, sheep herded along a road prefer type C).
TRAVERSAL_TYPEinteger7Pathfinding parameter specifying the character's movement traversal type. Expects TRAVERSAL_TYPE_SLOW (default), _FAST, or _NONE.
CHARACTER_AVOIDANCE_MODEinteger5Specifies which objects a pathfinding character avoids (other characters, dynamic obstacles like fast-moving objects and avatars, or both). Combined using bit flags; setting to AVOID_NONE disables avoidance for both categories.
CHARACTER_STAY_WITHIN_PARCELinteger15Determines whether a character is restricted to its starting parcel (default is FALSE). If TRUE, parcel boundaries act as one-way obstacles; the character cannot voluntarily leave and pathfinding behaviors (wander, flee, evade, pursue) will only choose goal points within the parcel. If pushed out, it can re-enter but cannot voluntarily leave again.
CHARACTER_ACCOUNT_FOR_SKIPPED_FRAMESinteger14If set to FALSE, the pathfinding character will not attempt to catch up on lost time when performance is low, potentially providing more reliable (though potentially more stuttery) movement. Default is TRUE.

Used by