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

LSL Wiki : llSetCameraEyeOffset

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawling22.us.archive.org
llSetCameraEyeOffset(vector offset)

Sets the camera eye offset used in this object if an avatar sits on it. Use ZERO_VECTOR to cancel.

The same functionality can be found in llSetCameraParams and more.

This defines the position of the camera. Define the point (coordinate) the camera is looking at using llSetCameraAtOffset.

offset must not be the same as the one specified in llSetCameraAtOffset.

Remember, these offsets only take effect when an avatar sits on the object. These functions can't be called to change camera parameters once the avatar is sitting. To do this, the avatar would have to stand up and sit down again.

Example:
default {
    state_entry() {
        llSetCameraEyeOffset(<-2, 0, 1>); // the camera is 2m behind and 1m above the object
        llSetCameraAtOffset(<2, 0, 1>); // and looks at a point that is 2m in front and 1m above the object
        // sitting on this object will now place your camera
        // so it's looking straight ahead on a line parallel
        // to the objects x (forward) axis, 1m above the objects center.
    }
}


Functions | Agent/Avatar | Camera
Comments [Hide comments/form]
There appears to be a limit on how far away the camera can be placed. I did a little testing; it looks as if it's 50 meters in one direction, though I don't know if that's a 50-meter-radius (i.e. anywhere within a 100-meter-diameter sphere) or if it's 50 meters in each direction at once (anywhere within a 100-by-100-by-100 cube). Sowwie.
-- PrioSerpentine (2004-09-19 18:27:56)
I wonder if this still works at all in 1.6... I tried the above code, and while I'm pretty sure that these functions are called, but they don't seem to have any effect on the camera...
-- GwynethLlewelyn (2005-04-25 14:44:08)
*shakes head*
not to be rude.
read all of what is writen about the function.
It might require a sit target.
-- BlindWanderer (2005-04-25 23:08:34)
If you use this it does work in a sit script, but actually you need to 'escape' to get to the default view. If you've moved your viewpoint (certainly with camera controls) it doesn't automatically reset to the correct position.
-- EloisePasteur (2005-07-18 09:23:55)
For anyone who's wondering: the camera is restrained to a 50m sphere around the avatar, as it is when controling it manually.

i.e. if you set the sit target to 100m west of the object, the camera can be placed between 50m and 150m west of the object (in a straight line).
-- AjDasilva (2006-02-11 15:53:21)
If the client turns off camera restrictions via the debug menu, then you're unlimited(?) as to how far away you can move the camera.
-- AdamKaupas (2007-04-01 14:01:52)
Attach a comment to this page: