Camera Commands

From Catznip
Jump to navigation Jump to search

Camera manipulation commands follow the same concept as @setenv where a single object can exclusively lock control of the camera.


While we don't anticipate major changes the final implementation and behaviour of these commands isn't set in stone and subject to your feedback.

Setting Camera values

@setcam=<n|y>

Only one object can hold this behaviour at a given time (debug output will show "locked" as the failure message on subsequent attempts). When an object holds the lock, all camera commands from all other objects will be ignored; when the object releases the lock all other camera behaviours will be restored.

@setcam_eyeoffset[<vector3>]=force

Changes the default camera offset by manipulating the CameraOffsetRearView debug setting.

@setcam_focus<object|agent|location>[;distance[;direction]]=force

Moves the camera and focus to the specified position (user can still change focus afterwards).

  • <object|agent|location> UUID of the object or agent to focus on or a locational vector (in region coordinates)
  • <distance> optional (calculated based on the object's size if omitted) distance of the camera to the focus
  • <direction> optional (calculated on current camera if omitted) normalized directional vector

Example 1 (move the camera to <128, 128, 75> looking down at the land): @setcam_focus:128/128/75;;0/0/1=force

Example 2 (rez a prim for this and grab its UUID): @setcam_focus:uuid;;1/0/0=force - look at the plywood cube (filling the screen) along negative X

Now resize the prim (20x20x20m) and retry the command. You'll note that the plywood cube still fills the screen. If you omit the distance RLVa will calculate it basded on the scale so the object is always fully in view.

Example 3 (get your own UUID): @setcam_focus:uuid;20;=force - look at yourself, from 20m away with your previous camera orientation


@setcam_focusoffset[<vector3>]=force

Changes the default camera focus offset by manipulating the FocusOffsetRearView debug setting.

@setcam_fov

@setcam_fovmin

@setcam_fovmax

@setcam_unlock

Camera Control Examples

Basic camera position (as detailed in Penny Patton's A Matter of perspective) can be done via the @setcam_eyeoffset and @setcam_focusoffset commands which adjust the CameraOffsetRearView and FocusOffsetRearView debug settings respectively.

NOTE: if you're using these without @setcam then please restore the default manually after you're done; otherwise @setcam=y will take care of cleaning up and restore things back to the user's default

Change 3rd person camera position & viewpoint

@setcam_eyeoffset-2/-0.4/-0.2=force

@setcam_eyeoffset0.9/-0.7/0.2=force

Restore viewer default

@setcam_eyeoffset=force

@setcam_eyeoffset=force

Compatibility with existing RLV commands

Existing camera commands that don't fit the setcam_XXX family will currently (silently) translate to their new counterparts this is only a courtesy and these synonyms will be removed in a future release. Please use only @setcam_XXX in any of your products.