Jump to content

Dora Gustafson

Advisor
  • Posts

    2,120
  • Joined

  • Last visited

Posts posted by Dora Gustafson

  1. This is a bit spicy
    I would say that a root prim has a local rotation of ZERO_ROTATION, always
    and it makes no sense to talk about a local rotation for the root prim
    We can talk about which axis to rotate: X, Y or Z

    You could try to insert ZERO_ROTATION in the code:

    llSetLinkPrimitiveParamsFast( LINK_ROOT, [PRIM_ROT_LOCAL, ZERO_ROTATION*open_rot]);// andllSetLinkPrimitiveParamsFast( LINK_ROOT, [PRIM_ROT_LOCAL, ZERO_ROTATION/open_rot]);

    But this will rotate the whole link-set not just the root

    :smileysurprised::):smileyvery-happy:

    • Like 1
  2. I do not agree, is this better do you think?

    if ( camon ) { llClearCameraParams(); }else { camset(); }camon = !camon;

    I think not
    All I do is omit redundant curly brackets

    I am sure our different views on this can lead to a long and overheated dispute

    Thank you for your interest

    :smileysurprised::):smileyvery-happy:

  3. Thank you for showing the way:)
    It is a particular seat that shows this behavior
    Other seats and unscripted prims works as expected
    The seat with the problem has a script with its own llSetCameraParams and although that setting is all different it makes the setting from the hud-script stay no matter how often you click
    Obviously it creates some conflict of a kind

    Thank you for saving me from going in sane

    :smileysurprised::):smileyvery-happy:

  4. This script in a hud shall do this simple thing when hud is clicked:
    Toggle camera when avi sits on something and clear camera when avi is not sitting

    // toggle between Set and Clear CameraParams, script by Dora Gustafson, Studio Dora 2016
    // v1.02 For hud attachment
    // v1.03 trigger by mouse click
    // v1.06 Disable when not sitting on object
    // Logic error???
    
    integer camon;
    
    camset()
    {
        llClearCameraParams(); // reset camera to default
        llSetCameraParams([
            CAMERA_ACTIVE, TRUE, // (TRUE or FALSE)
            CAMERA_BEHINDNESS_ANGLE, 180.0, // (0 to 180) degrees
            CAMERA_BEHINDNESS_LAG, 0.0, // (0 to 3) seconds
            CAMERA_DISTANCE, 8.0, // ( 0.5 to 50) meters
            CAMERA_FOCUS_LAG, 0.0 , // (0 to 3) seconds
            CAMERA_FOCUS_LOCKED, FALSE, // (TRUE or FALSE)
            CAMERA_FOCUS_OFFSET, <.0, .0, 3.0>, // <-10,-10,-10> to <10,10,10> meters
            CAMERA_FOCUS_THRESHOLD, 0.0, // (0 to 4) meters
            CAMERA_PITCH, 15.0, // (-45 to 80) degrees
            CAMERA_POSITION_LAG, 0.0, // (0 to 3) seconds
            CAMERA_POSITION_LOCKED, FALSE, // (TRUE or FALSE)
            CAMERA_POSITION_THRESHOLD, 0.0 // (0 to 4) meters
        ]);
    }
    
    default
    {
        attach( key id)
        {
            if (id != NULL_KEY)
            {
                llRequestPermissions( id, PERMISSION_CONTROL_CAMERA);
                camon = TRUE;
            }
            else llReleaseControls();
        }
        run_time_permissions( integer perm)
        {
            if ( perm & PERMISSION_CONTROL_CAMERA )
            {
                if ( camon ) camset();
                else llClearCameraParams();
            }
        }
        touch_end( integer n)
        {
            if ( llGetPermissions() & PERMISSION_CONTROL_CAMERA )
            {
                if ( llGetAnimation( llGetOwner()) == "Sitting" )
                {
                    if ( camon ) llClearCameraParams();
                    else camset();
                    camon = !camon;
                }
                else if ( camon )
                {
                    llClearCameraParams();
                    camon = !camon;
                }
    // TEST monitor
    llOwnerSay( llGetAnimation( llGetOwner())+"  camon = "+(string)camon);
            }
        }
    }

    The logic in the touch event handler works so far that the flag: camon, is toggled when it is supposed to toggle, but the camera only reacts the first time after avi sat or stood up.
    It may be something simple but I can't see it and need help

  5. Also keep in mind: The text's height over prim position is proportional to the prim's Z-dimension.
    This is true no matter how the prim is rotated.
    It can be used in a hud when you only see X and Y axis: Adjust text height by adjusting the Z dimension
    The Z dimension is not visible and can have any size without disturbing the hud's appearance

    :smileysurprised::):smileyvery-happy:

  6. Short and pretty:) Congratulations.

    I'm not sure what you refer to when you say: 'The SL build system rotations doesn't translate well'
    My guess is that your child relies on a chat message every 0.05 seconds to move smoothly
    and you can not guarantee that because chat is not served instantaneously and without delay.
    To overcome that you could minimize the chat by only sending initial data and maybe start and stop commands.
    The child script should be self contained and be able to loop the angle in small, fast increments.

    Secondly I don't see why you can't make it spin with a horizontal axle
    The basic cirle has a horizontal axis, the Y-axis

    float angl; // incremented by small amounts, 0 <= angl < TWO_PI
    vector V = < llCos( angl), .0, llSin( angl)>;

    With baseRot = ZERO_ROTATION it should.

    Finally a small detail: llRegionSay() is prettier and course less lag than llShout()

    :smileysurprised::):smileyvery-happy:

    • Like 1
  7. LSL provides some powerful functions that deliver rotations (quaternions) and all it takes are some vectors or axis or angles.

    For the present task you may use: llAxisAngle2Rot( vector axis, float angle );
    The arguments almost speak for them self
    axis is any axis in space
    angle is the angle to rotate about the axis

    To create a spinning object increment the angle in small rapid steps

    :smileysurprised::):smileyvery-happy:

  8. A server can only handle so and so much and the temporary prims are loads if paid for or not.
    Meaning a multiple vertex monster will take up the same server time if the LI is not counted against your prim allowance and therefore create the same amount of lag

    Knowing that all that can be abused will be abused, it looks like a sensible decision to me

  9. The land cursor snaps to land units: 4x4 meters, so to mark 4096/2 = 2048m² you will mark 2048/16= 128 land units
    That equals 16 by 8 land units
    You may not want that shape, this is just an example

    You need not get it right the first time. You could create 8 subdivisions and later join them into one parcel

    :smileysurprised::):smileyvery-happy:

  10. Run the SL viewer software from the SSD and include cache on SSD
    Put the  chat log on the HDD, it is not important for performance speed

    I wouldn't worry too much of the laptop, but I would focus on the Internet connection
    Cable connection is much preferable for wifi and wireless
    Cable, even at the same speed, performs better because it is reliable over time

    The computer specs are good

    :smileysurprised::):smileyvery-happy:

     

×
×
  • Create New...