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

LSL Wiki : llSetCameraEyeOffset

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl338.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.
    }
}


This article wasn't helpful for you? Maybe the related article at the LSL Portal is able to bring enlightenment.

Functions | Agent/Avatar | Camera
There are 6 comments on this page. [Display comments/form]