Jump to content

How do I change camera angle of a pose ball


Freecilla Kuhn
 Share

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

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

Recommended Posts

Hi, ok when I use a pose ball I always have the camera angle from behind my avatar which is usually a good thing but how do I change it so I can see my av from the side? I think I have to add a camera setting command but I don't know where and more importantly it needs to change in rotation of view not just up, down, left or right. So when I lay in a bed that is close to the wall I do not see the outside of the wall but I see my av from the side. Here is where I would like to add the camera angle change to . . . Also, is it possible to add a camera angle change in this script because it says DO NOT CHANGE BELOW... or is that there so unexperienced people do not mess it up and break it?

// STEP 1: Drop your pose into an object inventory with this script (only 1)
// STEP 2: Enter the text you wish to hover about the pose object below

string HOVER_TEXT = "";

// STEP 3: Enter text to apear in pie (right click)

string PIE_TEXT = "Lay Down"; // limited to 9 characters

// STEP 4: Hit "SAVE" below. If you change the pose, you can reset the script to re-read the pose


// THIS SCRIPT MAY NOT BE SOLD, KEEP IT OPEN SOURCE AND SPREAD IT AROUND

/////////////////////// DO NOT CHANGE BELOW ////////////////////////
string ANIMATION;
integer is_sitting;

default
{
    state_entry()
    {
        ANIMATION = llGetInventoryName(INVENTORY_ANIMATION, 0);
        is_sitting = 0;
        llSetSitText(PIE_TEXT);
        llSitTarget(<0,0,.1>,ZERO_ROTATION);
        // llSetTexture("5748decc-f629-461c-9a36-a35a221fe21f",ALL_SIDES);
        llSetText(HOVER_TEXT,<1,1,1>,1);
    }
    
    changed(integer change)
    {
        if(change & CHANGED_LINK)
        {
            key av = llAvatarOnSitTarget();
            
            if(av != NULL_KEY)
            {
                llRequestPermissions(av, PERMISSION_TRIGGER_ANIMATION);
            }
            else
            {
                if((llGetPermissions() & PERMISSION_TRIGGER_ANIMATION) && is_sitting)
                {
                    is_sitting = 0;
                    llStopAnimation(ANIMATION);
                    llSetText(HOVER_TEXT,<1,1,1>,1);
                    llSetAlpha( 1.0, ALL_SIDES );
                    // llSetTexture("5748decc-f629-461c-9a36-a35a221fe21f",ALL_SIDES);
                }
            }
            
        }
        ANIMATION = llGetInventoryName(INVENTORY_ANIMATION, 0);
    }
    
    run_time_permissions(integer perm)
    {
        if(perm & PERMISSION_TRIGGER_ANIMATION)
        {
            is_sitting = 1;
            llStopAnimation("sit_generic");
            llStopAnimation("sit");
            llStartAnimation(ANIMATION);
            llSetAlpha( 0.0, ALL_SIDES );
            //llSetTexture("f54a0c32-3cd1-d49a-5b4f-7b792bebc204",ALL_SIDES);
            llSetText("",<1,1,1>,1);
        }
    }
    
    on_rez(integer start_param)
    {
        llResetScript();
    }
}

Link to comment
Share on other sites

In addition I can throw in this script I wrote and use myself

// sitting with camera moved to show the sitting her face. SD 070924, 2010-02-26// was 'sitting camera front'rotation turnOnChair;default{     state_entry()     {          turnOnChair = llEuler2Rot( <-7.0,0.0,90.0> * DEG_TO_RAD );          llSitTarget( <0.2, 0.0, 0.05> * ( turnOnChair ), turnOnChair );     }     changed(integer change)      {         if (change & CHANGED_LINK)         {  // if a link change occurs (sit or unsit)             key sitter = llAvatarOnSitTarget() ;             if(sitter != NULL_KEY)             {                 llRequestPermissions( sitter, PERMISSION_CONTROL_CAMERA );                 llSetCameraParams([CAMERA_ACTIVE, TRUE ]); // 1 is active, 0 is inactive             }                 else                 if ( llGetPermissions() & PERMISSION_CONTROL_CAMERA )                 {                     //llClearCameraParams(); // reset camera to default                     //llSetCameraParams([ CAMERA_ACTIVE, FALSE ]);                 }         }     }    run_time_permissions(integer perm)     {        if ( perm & PERMISSION_CONTROL_CAMERA )        {            vector camPos = llGetPos() + (<2.0, 0.0, 0.6> * llGetRot() * turnOnChair) ;            vector camFocus = llGetPos() ;            llClearCameraParams(); // reset camera to default            llSetCameraParams([                CAMERA_ACTIVE, 1, // 1 is active, 0 is inactive                CAMERA_FOCUS, camFocus, // region relative position                CAMERA_FOCUS_LOCKED, TRUE, // (TRUE or FALSE)                CAMERA_POSITION, camPos, // region relative position                CAMERA_POSITION_LOCKED, TRUE // (TRUE or FALSE)            ]);            //llOwnerSay("Cam Pos= "+(string)camPos);            //llOwnerSay("Cam Focus= "+(string)camFocus);        }    }}

It is almost doing what you ask
it uses the default sit animation so it doesn't start or stop any animations
it is FREE to modify, copy, transfer, use, give away and even sell:smileyvery-happy:

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4628 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...