I've found the functions:
CODE
llGetCameraPos();
llGetCameraRot();
If I save the information from these functions, can I set the camera to the same
settings whenever I like?
There doesn't seem to be the functions:
CODE
llSetCameraPos();
llSetCAmeraRot();
I've found:
CODE
llSetCameraParams()
But I don't know if that is right.
I tried the following code:
CODE
vector v;
default {
state_entry() {
v = llGetCameraPos();
llOwnerSay("Camera is at: " + (string) v);
}
touch_start(integer num) {
llRequestPermissions(llGetOwner(), PERMISSION_CONTROL_CAMERA);
}
run_time_permissions(integer perm)
{
llOwnerSay("perm event:" + (string) perm);
if (perm & PERMISSION_TRACK_CAMERA) {
llOwnerSay("Got Track Perm - setting camera");
llSetCameraParams([CAMERA_POSITION, v]);
}
else if (perm & PERMISSION_CONTROL_CAMERA) {
llOwnerSay("Got Control Perm - setting camera");
llSetCameraParams([CAMERA_POSITION, v]);
}
}
}
But nothing happens (other than the expected output; the camera diesn't move.
Thanks
Xaq