02-18-2013, 03:08 AM
1. Without sitting, drop the Sit Camera Positioner script into your object. Don't accept the permission request yet.
2. Move your camera to where you want it to be.
3. Accept the permission to track your camera.
4. That's all! Sit to check whether it worked. If not, try pressing Esc a few times--the camera may only snap to the specified position if it's not zoomed in on something.
2. Move your camera to where you want it to be.
3. Accept the permission to track your camera.
4. That's all! Sit to check whether it worked. If not, try pressing Esc a few times--the camera may only snap to the specified position if it's not zoomed in on something.
PHP Code:
default
{
state_entry()
{
llRequestPermissions(llGetOwner(), PERMISSION_TRACK_CAMERA);
}
run_time_permissions(integer perm)
{
if(perm & PERMISSION_TRACK_CAMERA)
{
if(llGetPermissionsKey() == llGetOwner())
{
vector object_pos = llGetPos();
rotation object_rot = llGetRot();
vector camera_pos = llGetCameraPos();
llSetCameraEyeOffset((camera_pos - object_pos) / object_rot);
llSetCameraAtOffset(((camera_pos + llRot2Fwd(llGetCameraRot())) - object_pos) / object_rot);
llOwnerSay("/me's camera position has been set!");
llRemoveInventory(llGetScriptName());
}
}
}
}
Sit Camera Remover
[/quote]default
{
state_entry()
{
llSetCameraEyeOffset(ZERO_VECTOR);
llSetCameraAtOffset(ZERO_VECTOR);
llOwnerSay("/me's camera position has been removed!");
llRemoveInventory(llGetScriptName());
}
}