LSL Protocol/Restrained Love Open Relay Group/camera

From Second Life Wiki
Jump to: navigation, search

camera

STATUS: draft

version: 001

Implemented in Dahlia's multirelay 1.3.8

RECOMMENDED WITH: vision

  • !x-camera with three subcommands
!x-camera/mouselook
!x-camera/control
!x-camera/track

The syntax is

!x-camera/mouselook
!x-camera/mouselook/clear
!x-camera/control/INTEGER/FLOAT/FLOAT/FLOAT/FLOAT/INTEGER/VECTOR/FLOAT/FLOAT/VECTOR/FLOAT/INTEGER/FLOAT
!x-camera/control/clear
!x-camera/track/FLOAT
!x-camera/track/clear
!x-camera/clear

The purpose of this x-tension is to enable the relay to control the camera of the wearer. The following commands summarize the use of the camera generally used by RLV controllers (at least the use we are aware of).

Description of !x-camera/mouselook and !x-camera/mouselook/clear

!x-camera/mouselook forces the wearer of the relay to use mouselook mode. !x-camera/mouselook is a synonym of the Susan's relay command @thirdview=add and @thirdview=n. !x-camera/mouselook/clear cancels the previous order. It is synonym to the Susan's relay command @thirdview=rem and @thirdview=y.

  • The acknowledgment for !x-camera/mouselook is either !x-camera/mouselook,ok or !x-camera/mouselook,ko, not @thirdview=add,ok or @thirdview=add,ko. Note that the command @clear=thirdview does not cancel a !x-camera/mouselook.
  • The acknowledgment for !x-camera/mouselook/clear is either !x-camera/mouselook/clear,ok or !x-camera/mouselook/clear,ko, not @thirdview=add,ok or @thirdview=add,ko.

This command is a restriction, i.e. in ask mode, a permission must be granted. When several controllers send !x-camera/mouselook, a stack of restrictions is created and the last one is used. When the stack is empty, the wearer can leave the mouselook mode.

Interaction of !x-camera/mouselook with !x-vision

When the wearer does not want to switch to mouselook mode, a blind command like !x-vision/<0'0'0>/1.0/TEXTURE_BLANK/1.0'1.0/0.0'0.0/0.0 will be executed by the relay itself until the wearer changes the mode.

Description of !x-camera/control and !x-camera/control/clear

This command requires for the script in the relay to have the PERMISSION_CONTROL_CAMERA. The syntax of !x-camera/control follows the syntax of the LSL command llSetCameraParams(). So the syntax is

!x-camera/control/INTEGER/FLOAT/FLOAT/FLOAT/FLOAT/INTEGER/VECTOR/FLOAT/FLOAT/VECTOR/FLOAT/INTEGER/FLOAT
!x-camera/control/clear

See http://lslwiki.net/lslwiki/wakka.php?wakka=llSetCameraParams for further details. When a parameter is the empty string, the default value must be used. This command is a restriction, i.e. in ask mode, a permission must be granted. When several controllers send camera control commands, a stack of settings is created and the last one is used. When the stack is empty, the wearer's camera goes back to default settings, i.e. llClearCameraParams() is executed.

  • Warning: the command !x-camera/control/clear is not equivalent to !x-camera/control/////////////.

Description of !x-camera/track and !x-camera/track/clear

This command requires for the script in the relay to have the PERMISSION_TRACK_CAMERA. The syntax of !x-camera/track is

!x-camera/track/FLOAT
!x-camera/track/clear

It forces the wearer to keep the camera close to the avatar, the distance must not be greater than the float number given in parameter. The command !x-camera/track/clear cancels the previous order. This command is a restriction, i.e. in ask mode, a permission must be granted. When several controllers send !x-camera/track, a stack of distances is created and the last one is used. When the stack is empty, the wearer's camera goes back to the default setting.

Interaction of !x-camera/track with !x-vision

When the wearer keeps the camera too far, a blind command like !x-vision/<0'0'0>/1.0/TEXTURE_BLANK/1.0'1.0/0.0'0.0/0.0 will be executed by the relay itself until the wearer puts the camera closer.

The command !x-camera/clear

This command is equivalent to !x-camera/mouselook/clear|!x-camera/control/clear|!x-camera/track/clear.