Jump to content

Possible camera position problem, Magnum vs Release


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

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

Recommended Posts

Testing these two:

Second Life RC Magnum 13.09.27.281745
Second Life Server 13.09.21.281328

I had a report from a customer that my HUD, which stores camera positions, wasn't working on her region. Long story short, she's right. She's on the Magnum version noted above. The same code, in the same HUD instance, works fine if you just TP to a main release channel region.

This is easy enough to demonstrate. The problem can be seen by attaching a prim to a HUD position and putting in the following script. It saves the camera position when you click it. It then immediately sets the camera position with the same info. Now, if you press ESC to reset your view, you'll see the camera *move* on a Magnum (also tested Blue Steel) region, but if you try the same steps (after a script reset) on a main release channel region, it's rock solid after you press ESC and (correctly) doesn't move the view. In other words, since the camera position was grabbed, and set as the active view, resetting the view shouldn't change anything on the screen - but on Magnum regions, it does.

Different camera zoom levels magnify this anomoly. Zoomed in close to a prim shows it the best.

 
=============================
 
rotation CameraRotation;
vector CameraPosition;
 
MoveCameraTo(vector v, rotation r)
{
    llSetCameraParams( [CAMERA_ACTIVE, FALSE] );
    llClearCameraParams();
 
    llSetCameraParams( [CAMERA_ACTIVE, TRUE,
        CAMERA_FOCUS, v + llRot2Fwd( r ),
        CAMERA_FOCUS_LOCKED, TRUE,
        CAMERA_POSITION, v,
        CAMERA_POSITION_LOCKED, TRUE
            ] );
}
 
default
{
    state_entry()
    {
        llRequestPermissions( llGetOwner(), PERMISSION_TRACK_CAMERA|PERMISSION_CONTROL_CAMERA);
    }
    
    run_time_permissions(integer permissions)
    {
        if ( permissions & PERMISSION_TRACK_CAMERA )
        {
            llSetCameraParams( [CAMERA_ACTIVE, FALSE] );
            llClearCameraParams();
            state Ready;
        }
    }
}
 
state Ready
{
    state_entry()
    {
        llOwnerSay("Click to capture camera position");
    }
 
    touch_end(integer total_number)
    {
        if ( llDetectedKey(0) != llGetOwner() )
            return;
 
        CameraPosition = llGetCameraPos();
        CameraRotation = llGetCameraRot();
        llOwnerSay("Camera recorded at " + (string)CameraPosition + " - " + (string)CameraRotation);
 
        // now set the camera to this position
        MoveCameraTo( CameraPosition, CameraRotation );       
    }
}

 

Link to comment
Share on other sites

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