Difference between revisions of "LlSetCameraParams"

From Second Life Wiki
Jump to: navigation, search
 
Line 1: Line 1:
{{LSLFunctionAll|func_id=313|func_sleep=0.0|func_energy=10.0|func=llSetCameraParams|p1_type=list|p1_name=rules|func_footnote=Sets multiple camera parameters at once.<br />List format is [ rule1, data1, rule2, data2 . . . rulen, datan ]|return_text|spec|caveats|examples|helpers|related|also|notes}}[[Category:LSL_Functions]][[Category:LSL_Stub]]
+
{{LSL_Function
 +
|func_id=313|func_sleep=0.0|func_energy=10.0
 +
|func=llSetCameraParams|p1_type=list|p1_name=rules
 +
|func_footnote
 +
|func_desc=Sets multiple camera parameters at once.<br />List format is [ rule1, data1, rule2, data2 . . . rulen, datan ]
 +
|return_text
 +
|spec
 +
|caveats
 +
|constants={{{!}} {{Prettytable}}
 +
{{!}}-
 +
! Rule
 +
! Value
 +
! Parameter
 +
! Default
 +
! Value Range
 +
! Description
 +
{{!}}-
 +
{{!}} {{LSLG|CAMERA_ACTIVE}}
 +
{{!}} 12
 +
{{!}} {{LSLG|integer}} isActive
 +
{{!}} {{LSLG|FALSE}}
 +
{{!}} {{LSLG|TRUE}} or {{LSLG|FALSE}}
 +
{{!}} Turns on or off {{LSLG|script|scripted}} control of the camera.
 +
{{!}}-
 +
{{!}} {{LSLG|CAMERA_BEHINDNESS_ANGLE}}
 +
{{!}} 8
 +
{{!}} {{LSLG|float}} degrees
 +
{{!}} 10.0
 +
{{!}} 0 to 180
 +
{{!}} Sets the angle in degrees within which the camera is not constrained by changes in target rotation.
 +
{{!}}-
 +
{{!}} {{LSLG|CAMERA_BEHINDNESS_LAG}}
 +
{{!}} 9
 +
{{!}} {{LSLG|float}} seconds
 +
{{!}} 0.0
 +
{{!}} 0 to 3
 +
{{!}} Sets how strongly the camera is forced to stay behind the target if outside of behindness angle.
 +
{{!}}-
 +
{{!}} {{LSLG|CAMERA_DISTANCE}}
 +
{{!}} 7
 +
{{!}} {{LSLG|float}} meters
 +
{{!}} 3.0
 +
{{!}} 0.5 to 10
 +
{{!}} Sets how far away the camera wants to be from its target.
 +
{{!}}-
 +
{{!}} {{LSLG|CAMERA_FOCUS}}
 +
{{!}} 17
 +
{{!}} {{LSLG|vector}} position
 +
{{!}} n/a
 +
{{!}} n/a
 +
{{!}} Sets camera focus (target position) in {{LSLG|Region Coordinate|region coordinates}}.
 +
{{!}}-
 +
{{!}} {{LSLG|CAMERA_FOCUS_LAG}}
 +
{{!}} 6
 +
{{!}} {{LSLG|float}} seconds
 +
{{!}} 0.1
 +
{{!}} 0 to 3
 +
{{!}} How much the camera lags as it tries to aim towards the target.
 +
{{!}}-
 +
{{!}} {{LSLG|CAMERA_FOCUS_LOCKED}}
 +
{{!}} 22
 +
{{!}} {{LSLG|integer}} isLocked
 +
{{!}} {{LSLG|FALSE}}
 +
{{!}} {{LSLG|TRUE}} or {{LSLG|FALSE}}
 +
{{!}} Locks the camera focus so it will not move.
 +
{{!}}-
 +
{{!}} {{LSLG|CAMERA_FOCUS_OFFSET}}
 +
{{!}} 1
 +
{{!}} {{LSLG|vector}} [[meter|meters]]
 +
{{!}} <0.0, 0.0, 0.0>
 +
{{!}} <-10,-10,-10> to <10,10,10>
 +
{{!}} Adjusts the camera focus [[position]] relative to the target.
 +
{{!}}-
 +
{{!}} {{LSLG|CAMERA_FOCUS_THRESHOLD}}
 +
{{!}} 11
 +
{{!}} {{LSLG|float}} meters
 +
{{!}} 1.0
 +
{{!}} 0 to 4
 +
{{!}} Sets the radius of a sphere around the camera's target position within which its focus is not affected by target motion.
 +
{{!}}-
 +
{{!}} {{LSLG|CAMERA_PITCH}}
 +
{{!}} 0
 +
{{!}} {{LSLG|float}} degrees
 +
{{!}} 0.0
 +
{{!}} -45 to 80
 +
{{!}} Adjusts the angular amount that the camera aims straight ahead vs. straight down, maintaining the same distance; analogous to 'incidence'."
 +
{{!}}-
 +
{{!}} {{LSLG|CAMERA_POSITION}}
 +
{{!}} 13
 +
{{!}} {{LSLG|vector}} position
 +
{{!}} n/a
 +
{{!}} n/a
 +
{{!}} Sets camera position in {{LSLG|Region Coordinate|region coordinates}}.
 +
{{!}}-
 +
{{!}} {{LSLG|CAMERA_POSITION_LAG}}
 +
{{!}} 5
 +
{{!}} {{LSLG|float}} seconds
 +
{{!}} 0.1
 +
{{!}} 0 to 3
 +
{{!}} How much the camera lags as it tries to move towards its 'ideal' position.
 +
{{!}}-
 +
{{!}} {{LSLG|CAMERA_POSITION_LOCKED}}
 +
{{!}} 21
 +
{{!}} {{LSLG|integer}} isLocked
 +
{{!}} {{LSLG|FALSE}}
 +
{{!}} {{LSLG|TRUE}} or {{LSLG|FALSE}}
 +
{{!}} Locks the camera position so it will not move.
 +
{{!}}-
 +
{{!}} {{LSLG|CAMERA_POSITION_THRESHOLD}}
 +
{{!}} 10
 +
{{!}} {{LSLG|float}} meters
 +
{{!}} 1.0
 +
{{!}} 0 to 4
 +
{{!}} Sets the radius of a sphere around the camera's ideal position within which it is not affected by target motion.
 +
{{!}}}
 +
|examples=<pre>llSetCameraParams([
 +
        CAMERA_ACTIVE, 1, // 1 is active, 0 is inactive
 +
        CAMERA_BEHINDNESS_ANGLE, 10.0, // (0 to 180) degrees
 +
        CAMERA_BEHINDNESS_LAG, 0.0, // (0 to 3) seconds
 +
        CAMERA_DISTANCE, 3.0, // ( 0.5 to 10) meters
 +
        // CAMERA_FOCUS, <0,0,0>, // region-relative position
 +
        CAMERA_FOCUS_LAG, 0.1 , // (0 to 3) seconds
 +
        CAMERA_FOCUS_LOCKED, FALSE, // (TRUE or FALSE)
 +
        CAMERA_FOCUS_THRESHOLD, 1.0, // (0 to 4) meters
 +
        CAMERA_PITCH, 0.0, // (-45 to 80) degrees
 +
        // CAMERA_POSITION, <0,0,0>, // region-relative position
 +
        CAMERA_POSITION_LAG, 0.1, // (0 to 3) seconds
 +
        CAMERA_POSITION_LOCKED, FALSE, // (TRUE or FALSE)
 +
        CAMERA_POSITION_THRESHOLD, 1.0, // (0 to 4) meters
 +
        CAMERA_FOCUS_OFFSET, ZERO_VECTOR // <-10,-10,-10> to <10,10,10> meters
 +
    ]);</pre>
 +
|helpers
 +
|also_functions
 +
|also_events
 +
|also_tests
 +
|also_articles
 +
|notes
 +
|permission
 +
|negative_index
 +
|sort=SetCameraParams
 +
|cat1=Camera
 +
|cat2
 +
|cat3
 +
|cat4
 +
}}

Revision as of 11:10, 13 February 2007

Summary

Function: llSetCameraParams( list rules );

Sets multiple camera parameters at once.
List format is [ rule1, data1, rule2, data2 . . . rulen, datan ]

• list rules
Rule Value Parameter Default Value Range Description
CAMERA_ACTIVE 12 integer isActive FALSE TRUE or FALSE Turns on or off scripted control of the camera.
CAMERA_BEHINDNESS_ANGLE 8 float degrees 10.0 0 to 180 Sets the angle in degrees within which the camera is not constrained by changes in target rotation.
CAMERA_BEHINDNESS_LAG 9 float seconds 0.0 0 to 3 Sets how strongly the camera is forced to stay behind the target if outside of behindness angle.
CAMERA_DISTANCE 7 float meters 3.0 0.5 to 10 Sets how far away the camera wants to be from its target.
CAMERA_FOCUS 17 vector position n/a n/a Sets camera focus (target position) in region coordinates.
CAMERA_FOCUS_LAG 6 float seconds 0.1 0 to 3 How much the camera lags as it tries to aim towards the target.
CAMERA_FOCUS_LOCKED 22 integer isLocked FALSE TRUE or FALSE Locks the camera focus so it will not move.
CAMERA_FOCUS_OFFSET 1 vector meters <0.0, 0.0, 0.0> <-10,-10,-10> to <10,10,10> Adjusts the camera focus position relative to the target.
CAMERA_FOCUS_THRESHOLD 11 float meters 1.0 0 to 4 Sets the radius of a sphere around the camera's target position within which its focus is not affected by target motion.
CAMERA_PITCH 0 float degrees 0.0 -45 to 80 Adjusts the angular amount that the camera aims straight ahead vs. straight down, maintaining the same distance; analogous to 'incidence'."
CAMERA_POSITION 13 vector position n/a n/a Sets camera position in region coordinates.
CAMERA_POSITION_LAG 5 float seconds 0.1 0 to 3 How much the camera lags as it tries to move towards its 'ideal' position.
CAMERA_POSITION_LOCKED 21 integer isLocked FALSE TRUE or FALSE Locks the camera position so it will not move.
CAMERA_POSITION_THRESHOLD 10 float meters 1.0 0 to 4 Sets the radius of a sphere around the camera's ideal position within which it is not affected by target motion.

Examples

llSetCameraParams([
        CAMERA_ACTIVE, 1, // 1 is active, 0 is inactive
        CAMERA_BEHINDNESS_ANGLE, 10.0, // (0 to 180) degrees
        CAMERA_BEHINDNESS_LAG, 0.0, // (0 to 3) seconds
        CAMERA_DISTANCE, 3.0, // ( 0.5 to 10) meters
        // CAMERA_FOCUS, <0,0,0>, // region-relative position
        CAMERA_FOCUS_LAG, 0.1 , // (0 to 3) seconds
        CAMERA_FOCUS_LOCKED, FALSE, // (TRUE or FALSE)
        CAMERA_FOCUS_THRESHOLD, 1.0, // (0 to 4) meters
        CAMERA_PITCH, 0.0, // (-45 to 80) degrees
        // CAMERA_POSITION, <0,0,0>, // region-relative position
        CAMERA_POSITION_LAG, 0.1, // (0 to 3) seconds
        CAMERA_POSITION_LOCKED, FALSE, // (TRUE or FALSE)
        CAMERA_POSITION_THRESHOLD, 1.0, // (0 to 4) meters
        CAMERA_FOCUS_OFFSET, ZERO_VECTOR // <-10,-10,-10> to <10,10,10> meters
    ]);

Deep Notes

Search JIRA for related Issues

Signature

function void llSetCameraParams( list rules );