Jump to content

anyone ever use PERMISSION_TRACK_CAMERA ?


Xiija
 Share

You are about to reply to a thread that has been inactive for 3798 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Kinda. Years ago I scripted (and still give away) a little attachment that uses cam tracking and scripted cam control to slave your cam to somebody else's, as best it can. It actually works better now, with modern viewers[*] that populate the interestlist based on the position of the cam rather than that of the avatar. It's pretty fast, but it can't track smoothly, only update in jerky motion.

[* ETA: Come to think of it, for almost everybody, that's purely a function of what the sims send; the improved interestlist viewer is still just a release candidate at this point.]

Link to comment
Share on other sites

If you want to see like another person's camera do you need that person's permission to track camera
then you need permission from yourself to control your own camera

Since one script can't get permissions for more than one person you need two scripts to do the job
When you have realized that it is not too hard to do

:smileysurprised::):smileyvery-happy:

Link to comment
Share on other sites

i have one script that gets the track perms, and  messageLinked the vector to the

script where i get perms for myself to control cam...i must be missing something somewhere..arggg

that script of Qie's sure would help :)

 

Link to comment
Share on other sites

You have done what you should
I can't tell you why it isn't working without seeing the scripts

Here are a couple of scripts I made that work together

// glasses holder, script by Dora Gustafson, Studio Dora 2013
// works together with glasses in same prim
// attach and you can see SL the way I see it with my camera

default
{
    attach(key id)
    {
        if (id != NULL_KEY)
        {
            llSensor( "", "", AGENT_BY_LEGACY_NAME, 50.0, PI);
        }
        else llSetTimerEvent( 0.0 );
    }
    no_sensor( ){ llOwnerSay("No body close to ask for permission track camera"); }
    sensor( integer num_detected )
    {
        llRequestPermissions( llDetectedKey(0) , PERMISSION_TRACK_CAMERA);
    }
    run_time_permissions(integer perms)
    {
        if (perms & PERMISSION_TRACK_CAMERA)
        {
            llSetTimerEvent( 1.0 );
            llMessageLinked( LINK_THIS, 7, (string)llGetCameraPos(), (string)llGetCameraRot());
        }
    }
    timer()
    {
        llMessageLinked( LINK_THIS, 7, (string)llGetCameraPos(), (string)llGetCameraRot());
    }
}

 

// glasses, script by Dora Gustafson, Studio Dora 2013
// works together with glasses holder in same prim
// attach and you can see SL the way I see it with my camera
// temporary attach by touch
// v1.01 temp attach tuned

rotation camRot;
vector camPos;

default
{
    touch_start(integer num)
    {
        if (!llGetAttached()) llRequestPermissions( llDetectedKey(0), PERMISSION_ATTACH);
    }
    attach(key id)
    {
        if ( id ) llRequestPermissions(id , PERMISSION_ATTACH | PERMISSION_CONTROL_CAMERA);
        else llSetCameraParams([CAMERA_ACTIVE, FALSE]);
    }
    run_time_permissions(integer perms)
    {
        if ((perms & PERMISSION_ATTACH) && (!llGetAttached())) llAttachToAvatarTemp( ATTACH_NOSE);
        if (perms & PERMISSION_CONTROL_CAMERA) llClearCameraParams();
    }
    link_message( integer snum, integer n, string msg, key id)
    {
        if ( (n == 7) && (llGetPermissions() & PERMISSION_CONTROL_CAMERA) )
        {
            camPos = (vector)msg;
            camRot = (rotation)((string)id);
            llSetCameraParams([
                CAMERA_ACTIVE, TRUE,
                CAMERA_FOCUS, camPos + llRot2Fwd(camRot),
                CAMERA_FOCUS_LOCKED, TRUE,
                CAMERA_POSITION, camPos,
                CAMERA_POSITION_LOCKED, TRUE
            ]);
        }
    }
}

 

Besides letting you look at the world through another persons glasses it can also be attached temporarily (touch when rezzed)

Edited changes in program made by spelling control

:smileysurprised::):smileyvery-happy:

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3798 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...