llClearCameraParams
function
Replaces deprecated llReleaseCamera.
Function syntax
llClearCameraParams();- Energy
- 10
- Permission
PERMISSION_CONTROL_CAMERA
Resets all camera parameters to default values and turns off scripted camera control. Requires the PERMISSION_CONTROL_CAMERA runtime permission (automatically granted for attached or sat-on objects).
Resets all camera parameters to default values and turns off scripted camera control.
llClearCameraParams();Examples
Section titled “Examples”Example 1
44 collapsed lines
integer gEnabled;
askForPermissions(){ llRequestPermissions(llGetOwner(), PERMISSION_CONTROL_CAMERA);}
default{
on_rez(integer sp) { llResetScript(); }
state_entry() { askForPermissions(); }
touch_start(integer total_number) {
if (llDetectedKey(0) != llGetOwner()) { return; } else if (!llGetPermissions() & PERMISSION_CONTROL_CAMERA) { llOwnerSay("I need permissions to control your camera."); askForPermissions(); return; }
gEnabled = !gEnabled; if (gEnabled) { llOwnerSay("Enabled."); llSetCameraParams([ CAMERA_ACTIVE, 1, CAMERA_DISTANCE, 50.0 ]); } else { llOwnerSay("Disabled."); llClearCameraParams(); }
}
}See also
Section titled “See also”Functions
Section titled “Functions”Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.