Don't click here unless you want to be banned.

LSL Wiki : Camera

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl338.us.archive.org

Camera

SL includes both first-person and third-person camera modes. By disconnecting the camera from the avatar (to around 50m max away [see Notes below]), a lot more can be done otherwise. Some uses of the camera functions are for vehicles and machinima.

Functions

Function Description
llClearCameraParams Resets all camera values to their defaults.
llSetCameraParams Sets camera parameters.
llForceMouselook Sets camera to mouselook if an avatar sits on the object.
llGetCameraPos Gets current camera position for agent.
llGetCameraRot Gets current camera rotation for agent.
llReleaseCamera Returns camera to agent.
llSetCameraAtOffset Sets camera offset (position) to look at if an avatar sits on the object.
llSetCameraEyeOffset Sets camera eye offset if an avatar sits on the object.

Camera Modes

  1. seated avatar
    1. normal sitting cam (llSetCameraEyeOffset, llSetCameraAtOffset)
    2. scripted "follow cam" (llSetCameraParams)
  2. standing avatar
    1. normal avatar cam
    2. scripted "follow cam"
  3. alt-zoom
    1. another object or avatar
    2. a fixed point in space or the ground
  4. customize avatar mode
  5. mouselook

Hitting Esc in modes 3-5 will pop out to modes 1-2, depending on the situation (whether you are sitting or not, for example).

When grabbing/touching, the camera mode is 3b where the camera is locked to a fixed point in space. It isn't a special "grab" camera but just a variation of alt-zoom.

Scripted camera controls with llSetCameraParams are not active when in alt-zoom, customize avatar mode, or mouselook.

Notes


Q: How do I take a snapshot with LSL?
A: You can't. You need both a client (to render the image) and a user (to push the button) to take a snapshot. Short of some sort of macro system running on your computer, there's no way to automate this process.


Functions | Agent/Avatar
Comments [Hide comments/form]
Added llForceMouselook to the list and fixed up the formatting for readability.
-- JeffreyGomez (2005-05-31 19:47:56)
The revisions show what is done so, really, commenting on what you did is unnecessary...
-- EepQuirk (2005-06-01 01:38:55)
And commenting on the unnecessity of comments is unnecessary... Also commenting on unnecessary comments about unnecessary comments is likewise unnecessary.
-- LuccaKitty (2005-06-04 23:58:01)
I'm being a bit nit-picky here, but it would be possible to have LSL send a message from the server telling the client to take a snapshot. Not really useful because of lag, but I guess it could be used for some kinda camera for taking pics of things going on around you while you're afk.
-- AjDasilva (2005-08-24 17:19:34)
It could be done but would be a greasy hack.
-- BlindWanderer (2005-08-25 03:14:38)
Added a trick in the Notes on how to unlock the 50m limit of the camera.
-- modemcable120.2-130-66.mc.videotron.ca (2007-03-06 15:40:04)
Are these availiable in some way? - or wishful thinking?
1- Set the camera rotation - like a keyword in llSetCameraParams() called CAMERA_ROTATION,<0,0,0,1>. I rotate my chair using llSetRot() but can't figure out how to rotate the camera too.
2 - Set the camera field of view (FOV) in radians or degrees - like a keyword in llSetCameraParams() called CAMERA_FOV,45.0. This would be without specifying a target.
-- 70-100-207-244.dsl2.nor.ny.frontiernet.net (2007-04-13 17:54:59)
Attach a comment to this page: