Difference between revisions of "Template:LSL Constants/llCreateCharacter"

From Second Life Wiki
Jump to navigation Jump to search
(deprecated template)
 
(26 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<noinclude>{{Pathfinding alpha}}</noinclude>
<noinclude>{{LSLC|Pathfinding}}</noinclude>
{| {{Prettytable}}
{| class="sortable" {{Prettytable}}
|-{{Hl2}}
|-{{Hl2}}
!Option
! Option
!Value
! title="Value" style="min-width:2em;" |
!Default
! class="unsortable" | Default
!Description
! class="unsortable" | Range / Values
! class="unsortable" | Description
|-
|-
|CHARACTER_DESIRED_SPEED
|{{LSL Const|CHARACTER_DESIRED_SPEED|integer|1}}
|1
|{{#var:value}}
|
|6
|{{Interval|gte=0.2|lte=40.0|center=speed}}
|Speed of pursuit in meters per second.
|Speed of pursuit in meters per second.
|-
|-
|CHARACTER_RADIUS
|{{LSL Const|CHARACTER_RADIUS|integer|2}}
|2
|{{#var:value}}
|
|
|{{Interval|gte=0.125|lte=5.0|center=radius}}
|Set collision capsule radius.
|Set collision capsule radius.
|-
|-
|CHARACTER_LENGTH
|{{LSL Const|CHARACTER_LENGTH|integer|3}}
|3
|{{#var:value}}
|
|
|Set collision capsule length - cannot be less than two times the radius.
|{{Interval|gt=0.0|lte=10.0|center=length}}
|Set collision capsule length
 
If the value is less than twice the '''radius''' plus 0.1m, it will be set to twice the radius plus 0.1m.
|-
|-
|TRAVERSAL_TYPE
|{{LSL Const|CHARACTER_ORIENTATION|integer|4}}
|
|{{#var:value}}
|TRAVERSAL_TYPE_NONE
|[[VERTICAL]]
|Valid options are: TRAVERSAL_TYPE_FAST, TRAVERSAL_TYPE_SLOW, and TRAVERSAL_TYPE_NONE. To use FAST or SLOW, you must specify a CHARACTER_TYPE
|[[VERTICAL]], [[HORIZONTAL]]
|Set the character orientation.
|-
|{{LSL Const|TRAVERSAL_TYPE|integer|7}}
|{{#var:value}}
|[[TRAVERSAL_TYPE_SLOW]]
|[[TRAVERSAL_TYPE_FAST]], [[TRAVERSAL_TYPE_SLOW]], [[TRAVERSAL_TYPE_NONE]]
|Controls the speed at which characters moves on terrain that is less than 100% walkable will move faster (e.g., a cat crossing a street) or slower (e.g., a car driving in a swamp).
 
To use [[TRAVERSAL_TYPE_FAST|_FAST]] or [[TRAVERSAL_TYPE_SLOW|_SLOW]], you must specify a [[CHARACTER_TYPE]].
|-
|-
|CHARACTER_TYPE
|{{LSL Const|CHARACTER_TYPE|integer|6}}
|
|{{#var:value}}
|CHARACTER_TYPE_NONE
| [[CHARACTER_TYPE_NONE]]
|Specifies which walkability coefficient will be used by this character. Options are CHARACTER_TYPE_A, CHARACTER_TYPE_B, CHARACTER_TYPE_C, CHARACTER_TYPE_D, and CHARACTER_TYPE_NONE
| [[CHARACTER_TYPE_A]], [[CHARACTER_TYPE_B]], [[CHARACTER_TYPE_C]], [[CHARACTER_TYPE_D]], [[CHARACTER_TYPE_NONE]]
|Specifies which walkability coefficient will be used by this character.
|-
|-
|CHARACTER_AVOIDANCE_MODE
|{{LSL Const|CHARACTER_AVOIDANCE_MODE|integer|5}}
|
|{{#var:value}}
|AVOID_CHARACTERS <nowiki>|</nowiki> AVOID_DYNAMIC_OBSTACLES
|[[AVOID_CHARACTERS]] <nowiki>|</nowiki> [[AVOID_DYNAMIC_OBSTACLES]]
|Allows you to specify that a character should not try to avoid other characters, should not try to avoid dynamic obstacles (relatively fast moving objects and avatars), or both. This is framed in the positive sense ([CHARACTER_AVOIDANCE_MODE, AVOID_CHARACTERS] would create a character that avoided other characters but not agents or moving vehicles).
| Combinable Flags:{{PBR}} [[AVOID_CHARACTERS]], [[AVOID_DYNAMIC_OBSTACLES]], [[AVOID_NONE]]
|Allows you to specify that a character should not try to avoid other characters, should not try to avoid dynamic obstacles (relatively fast moving objects and avatars), or both. This is framed in the positive sense (<code><nowiki>[</nowiki>[[CHARACTER_AVOIDANCE_MODE]], [[AVOID_CHARACTERS]]]</code> would create a character that avoided other characters but not agents or moving vehicles).  Setting this parameter to [[AVOID_NONE]] causes the character to not avoid either category.
|-
|-
|CHARACTER_MAX_ACCEL
|{{LSL Const|CHARACTER_MAX_ACCEL|integer|8}}
|
|{{#var:value}}
|
|20
|{{Interval|gte=0.5|lte=40.0|center=acceleration}}
|The character's maximum acceleration rate.
|The character's maximum acceleration rate.
|-
|-
|CHARACTER_MAX_DECEL
|{{LSL Const|CHARACTER_MAX_DECEL|integer|9}}
|
|{{#var:value}}
|
|30
|{{Interval|gte=0.5|lte=60.0|center=deceleration}}
|The character's maximum deceleration rate.
|The character's maximum deceleration rate.
|-
|-
|CHARACTER_MAX_ANGULAR_SPEED
|{{LSL Const|CHARACTER_DESIRED_TURN_SPEED|integer|12}}
|
|{{#var:value}}
|
|6
|The character's maximum angular speed about the Z axis
|{{Interval|gte=0.02|lte=40.0|center=speed}}
|The character's maximum speed while turning--note that this is only loosely enforced (i.e., a character may turn at higher speeds under certain conditions)
|-
|{{LSL Const|CHARACTER_MAX_TURN_RADIUS|integer|10}}
|{{#var:value}}
|1.25
|{{Interval|gte=0.1|lte=10.0|center=radius}}
|The character's turn radius when traveling at [[CHARACTER_DESIRED_TURN_SPEED]]
|-
|{{LSL Const|CHARACTER_MAX_SPEED|integer|13}}
|{{#var:value}}
|20
|{{Interval|gte=1|lte=40.0|center=max_speed}}
|The character's maximum speed.  Affects speed when avoiding dynamic obstacles and when traversing low-walkability objects in [[TRAVERSAL_TYPE_FAST]] mode.
|-
|-
|CHARACTER_MAX_ANGULAR_ACCEL
|{{LSL Const|CHARACTER_ACCOUNT_FOR_SKIPPED_FRAMES|integer|14}}
|
|{{#var:value}}
|
|[[TRUE]]
|The character's maximum angular acceleration about the Z axis.
|[[TRUE]] or [[FALSE]]
|[[TRUE]] matches pre-existing behavior. If set to [[FALSE]], character will not attempt to catch up on lost time when pathfinding performance is low, potentially providing more reliable movement (albeit while potentially appearing to be more stuttery).  
|-
|-
|CHARACTER_TURN_SPEED_MULTIPLIER
|{{LSL Const|CHARACTER_STAY_WITHIN_PARCEL|integer|15}}
|
|{{#var:value}}
|
| Depends[[llCreateCharacter#ct-caveat|*]]
|When a character has to make certain kinds of turns, this value is multiplied by the character's desired speed and the character is slowed down to the new value before being allowed to turn. Note that this is not affected by the material the character is traversing...at least, not yet.  
|[[TRUE]] or [[FALSE]]
|[[FALSE]] matches traditional behavior. If set to [[TRUE]], treat the parcel boundaries as one-way obstacles (will re-enter but can't leave on it's own).
|}
|}

Latest revision as of 16:46, 28 October 2023

Option Default Range / Values Description
CHARACTER_DESIRED_SPEED 1 6 [0.2, 40.0] Speed of pursuit in meters per second.
CHARACTER_RADIUS 2 [0.125, 5.0] Set collision capsule radius.
CHARACTER_LENGTH 3 (0.0, 10.0] Set collision capsule length

If the value is less than twice the radius plus 0.1m, it will be set to twice the radius plus 0.1m.

CHARACTER_ORIENTATION 4 VERTICAL VERTICAL, HORIZONTAL Set the character orientation.
TRAVERSAL_TYPE 7 TRAVERSAL_TYPE_SLOW TRAVERSAL_TYPE_FAST, TRAVERSAL_TYPE_SLOW, TRAVERSAL_TYPE_NONE Controls the speed at which characters moves on terrain that is less than 100% walkable will move faster (e.g., a cat crossing a street) or slower (e.g., a car driving in a swamp).

To use _FAST or _SLOW, you must specify a CHARACTER_TYPE.

CHARACTER_TYPE 6 CHARACTER_TYPE_NONE CHARACTER_TYPE_A, CHARACTER_TYPE_B, CHARACTER_TYPE_C, CHARACTER_TYPE_D, CHARACTER_TYPE_NONE Specifies which walkability coefficient will be used by this character.
CHARACTER_AVOIDANCE_MODE 5 AVOID_CHARACTERS | AVOID_DYNAMIC_OBSTACLES Combinable Flags: AVOID_CHARACTERS, AVOID_DYNAMIC_OBSTACLES, AVOID_NONE Allows you to specify that a character should not try to avoid other characters, should not try to avoid dynamic obstacles (relatively fast moving objects and avatars), or both. This is framed in the positive sense ([CHARACTER_AVOIDANCE_MODE, AVOID_CHARACTERS] would create a character that avoided other characters but not agents or moving vehicles). Setting this parameter to AVOID_NONE causes the character to not avoid either category.
CHARACTER_MAX_ACCEL 8 20 [0.5, 40.0] The character's maximum acceleration rate.
CHARACTER_MAX_DECEL 9 30 [0.5, 60.0] The character's maximum deceleration rate.
CHARACTER_DESIRED_TURN_SPEED 12 6 [0.02, 40.0] The character's maximum speed while turning--note that this is only loosely enforced (i.e., a character may turn at higher speeds under certain conditions)
CHARACTER_MAX_TURN_RADIUS 10 1.25 [0.1, 10.0] The character's turn radius when traveling at CHARACTER_DESIRED_TURN_SPEED
CHARACTER_MAX_SPEED 13 20 [1, 40.0] The character's maximum speed. Affects speed when avoiding dynamic obstacles and when traversing low-walkability objects in TRAVERSAL_TYPE_FAST mode.
CHARACTER_ACCOUNT_FOR_SKIPPED_FRAMES 14 TRUE TRUE or FALSE TRUE matches pre-existing behavior. If set to FALSE, character will not attempt to catch up on lost time when pathfinding performance is low, potentially providing more reliable movement (albeit while potentially appearing to be more stuttery).
CHARACTER_STAY_WITHIN_PARCEL 15 Depends* TRUE or FALSE FALSE matches traditional behavior. If set to TRUE, treat the parcel boundaries as one-way obstacles (will re-enter but can't leave on it's own).