Jump to content

Marlon Wulluf

Resident
  • Posts

    20
  • Joined

  • Last visited

Posts posted by Marlon Wulluf

  1. @Innula Zenovka OK, now that seems to work, and all I need to do now, is to modify it a bit so that it can be placed into a root prim of a linkset that has touchable faces, IE,  a 4 way tunnel, that has 4 touchable faces, then try to (according to which face of the linked child is touched), get the entire linkset torotate and move into place using the linked child as if it was a single prim.

    As I said, I'm useless at Einstein math, and working with vectors and rotations that don't actually match the expected numbers so that a conversion is required, hence a vast knowledge of trig is needed.

    Trig is something I hated, even in school, but give me boolean algebra? and I can tell you the truth tables of AND, NAND, OR, NOR, XOR, gates of digital circuits

  2. That's not the point, what if I created  a modular system that just like the video here:- https://www.dropbox.com/s/gt52u67yjpf1v3n/Auto-Align.avi?dl=0  I would need to then, (according to you), rez a module, align it to where I think someone would want it positioned, then record that position, then add it a script, then rez another module and repeat,,,, the idea is NOT to have to record ANY positions or rotations, but for the scripts to do that automatically, just like the short video I posted,,, if that's too hard to understand then there's no point in continuing this futile attempt.

    I'll explain this once more.

    The idea is to rez a prim or a linkset (watch above video), then TOUCH any face on that prim or linkset, it will either glow or change color to show that side of the prim/object has been selected, THEN, rez another prim/object and touch one of it's faces, and the 2nd object/prim will auto align with the face of the 1st object shown glowing or changed color, regardless of random positioning.

    Like the video, the main object has not just that 1 point of contact but could have other points too, and the other object(s) may have multiple points of contact too, meaning not just that one point shown in the video would be touched,,, there could be another point further along that object, and by clicking that would rotate the object and align to that contact point instead.

    I can't get much simpler than that.

    If you need further example, I suggest going to the marketplace and buying the BBI Forseti modular space station and look for yourself.

  3. @Innula Zenovka Have a look at this video screenshot I took, excuse the quality, as my viewer was using up most of the GFX memory and camstudio didn't like it when trying to record at a higher resolution, anyway,,,, this is the procedure, I took in following your suggestion to the letter, and as you can see at the end when I move the pointer around on the slave prim, I'm trying to click it, and it's not doing anything.

    Procedure I used to attempt prim auto align.

    The previous video:- https://www.dropbox.com/s/gt52u67yjpf1v3n/Auto-Align.avi?dl=0 should have been self explanatory.

  4. 10 hours ago, Innula Zenovka said:

    @Marlon Wulluf  I'm sorry for not making myself clearer.   All the finished product needs is my final two scripts.   The first two are simply there to enable you to calculate rotation rRot  and  vector vOffset to put in the "slave script".   

    Then all you need in the "master" script is something to make the main unit announce its presence to the slave unit.   It doesn't need to send anything to the slave unit -- the slave script reads the master unit's uuid in the listen event, uses that to discover the main unit's position and rotation on the region, and then does the necessary calculations.

    All the finished product needs are my last two scripts -- throw away the first two once you've used them to calculate the offset and rotation to put in the final slave script.

    I realize that, but that's based on the slave prim being in the exact rotation and position every time, so that the offset and rotation is the same,,,, have a look at the video again,,,, I touched the left object and it lit up, then I touched the right object and it then aligned with the face of the right object, it doesn't matter how close or far the 2nd object is or how it's rotated, it will still line up with the 1st object, without editing anything.

    I'm not trying to sound sarcastic, but did you try the scripts inworld?  I did, and I even did it as you suggested, and the slave prim didn't move an inch.

  5. @Innula Zenovka Thanks for the scripts, but using 4 scripts and to write down data wouldn't be feasible for other people to do, hence the requirement of just clicking one face on the main prim/object then clicking a face on the child prim/object and they would auto align without entering anything into the scripts.

    I had to modify them a little and even though you supplied 4 scripts, I narrowed it down to just 2, the main and the child, and instead of the main saying the offset and the rotation of the child, they are first converted into a list, then to a string for sending to the child using llRegionSay,,,, then in the child script, the conversion is reversed, and the variable vTargetPos  is calculated with the offset received from the main and the variable rTargetRot is calculated also to include rRot from the main, then the usual movement control is used, but it don't want to work, there is no movement.

    These are the 2 scripts I modified:-

    //PLACE IN MASTER OBJECT TO READ SLAVE OBJECT'S OFFSET AND ROTATION IN RELATION TO MASTER OBJECT
    
    integer iChannel = -67341870;
    integer cChannel = -27465144;
    
    list objDetails;
    
    default
    {
        state_entry()
        {
            llListen(iChannel, "","","");
        }
    
        listen(integer channel, string name, key id, string message)
        {
            list temp = llGetObjectDetails(id, [OBJECT_POS,OBJECT_ROT]);//Read region position and rotation of child object
            vector vMyPos = llGetPos();//Main object's position
            rotation rMyRot = llGetRot();//Main object's rotation
            vector vChildPos = llList2Vector(temp, 0);//Child object's position
            rotation rChildRot = llList2Rot(temp, 1);//Child object's rotation
    
            vector vOffset = (vChildPos - vMyPos)/rMyRot; //calculate how far the child object is from the main object, discounting the main object's rotation
            //that is, the offset when the main object is rotated at <0.0,0.0,0.0>
            rChildRot = rChildRot / rMyRot;//calculate the child object's rotation when the main object is rotated at  <0.0,0.0,0.0>
            objDetails = [vOffset, rChildRot];
            string objSend = llDumpList2String(objDetails,"|"); // Convert to a string ready for sending to the slave prim.
            llRegionSay(cChannel, objSend); // Send the Slave offset and rotation to the Slave.
    
        }
    }

    And this one for the child prim:-

    //PLACE THIS IN THE CHILD OBJECT TO MAKE IT MOVE INTO THE DESIRED POSITION AND ROTATION IN RELATION TO THE MAIN OBJECT
    integer iChannel = -67341870;
    integer cChannel = -27465144;
    
    list objDetails;
    
    rotation rRot; // = <0.0, 0.0, -1.0, 0.0>; //fill in desired rotation here, rotation provided by the Master prim
    vector vOffset; // = <1.0,0.0,0.0>; //fill in desired offset here, offset provided by the Master prim.
    
    default
    {
        state_entry()
        {
            llListen(iChannel, "","","");
            llListen(cChannel, "","","");
        }
    
        touch_start(integer num_detected)
        {
            llRegionSay(iChannel,"boo");   
        }
    
        listen(integer channel, string name, key id, string message)
        {
            list temp = llGetObjectDetails(id,[OBJECT_POS,OBJECT_ROT]);
            vector vObjectPos = llList2Vector(temp, 0);//read target object's position
            rotation rObjectRot = llList2Rot(temp,1);//and rotation
    //        vector vTargetPos = vObjectPos + vOffset * rObjectRot;//calculate the target position, using the target object's frame of rotational reference, not the region's (i.e. relative to the target object)
    //        rotation rTargetRot = rRot * rObjectRot;//calculate the child object's desired rotation, using the target object's frame of rotational reference
            if (channel == cChannel)
            {
                objDetails = llParseString2List(message,["|"],[]); // Convert the incoming text back into a list.
                vOffset = llList2Vector(objDetails, 0); // Separate the offset from the list.
                rRot = llList2Rot(objDetails, 1); // Separate the rotation from the list.
    
    // Prepare this slave prim for movement and rotation.
                vector vTargetPos = vObjectPos + vOffset * rObjectRot;
                rotation rTargetRot = rRot * rObjectRot;
                llSay(0, (string)vOffset); // Used for debugging
                llSay(0, (string)rRot); // Used for debugging
    //            llSay(0, llList2String(objDetails, 0));
    //            llSay(0, llList2String(objDetails, 1));
                llSetRegionPos(vTargetPos);//move to the target position
                llSetRot(rTargetRot);//and rotate to face in appropriate direction 
            }
        }
    }

     

  6. 2 hours ago, Innula Zenovka said:

    If I properly understand what you want to do, you already know the position and rotation, relative to the main unit, you want the module to occupy.    That's pretty simple -- just read the position and rotation of the main unit and apply those to the pre-set offset and rotation to calculate the region position and rotation to which the second module needs to move.

    Or am I missing something?

    Yep you're definitely missing that I'm no Einstein :) and trig is not my forte.

  7. They say video say more, than trying to explain in text :) ,,,,,,the below link is to a short video I created, demonstrating what I want the script to do,,,, bare in mind, the 2 objects are completely separate and are not linked to each other, and each module has only 1 script in it's root prim, and is part of the afore mentioned space station where the scripts are no mod.

     

    https://www.dropbox.com/s/gt52u67yjpf1v3n/Auto-Align.avi?dl=0

  8. I already know about this tool in Firestorm, but it's only use to when building, but what if I'm building a modular system, that instead of someone rezzing each piece and manually aligning them up, a script would do that, not just for prims but also for linksets too

    EG.

     I'm using completely separate linksets,,, 1 set is a tunnel with 2 hollowed prims, 1 at each end of the tunnel, the tunnel itself is root and the end prims are children, the other objects (T section and curved tunnel), not linked to the tunnel, but as separate objects, have the same hollowed prim at the ends of the objects,,, EG, the T section would have 3 hollowed prims 1 at each end, as children to the root prim which would be one of the center prims of the T section, the idea would be to touch the outer face of one of those child prims and it would glow to show selected,,,, then on another completely separate object linkset, I would touch the outside face of another child prim and the 2nd object would move into alignment with the first object that has the face glowing, but there's a difference, if I touched the outer face of any point of the T section then it becomes stationary and when I touch the outer face of the tunnel, then the tunnel not the T section would move into alignment, but if I touched the outer face of the tunnel first, then touched the outer face of one of the T section entrances, then the tunnel would be stationary and the T section would move into alignment, this way I can create modular builds that would auto align when one face is clicked then another face etc etc.

     

    Much like this short video,,,, the parts are from a space station I purchased, but the scripts are no mod, and each part has only 1 script.

    https://www.dropbox.com/s/gt52u67yjpf1v3n/Auto-Align.avi?dl=0

  9. OK, I'm using completely separate linksets,,, 1 set is a tunnel with 2 hollowed prims, 1 at each end of the tunnel, the tunnel itself is root and the end prims are children, the other objects (T section and curved tunnel), not linked to the tunnel, but as separate objects, have the same hollowed prim at the ends of the objects,,, EG, the T section would have 3 hollowed prims 1 at each end, as children to the root prim which would be one of the center prims of the T section, the idea would be to touch the outer face of one of those child prims and it would glow to show selected,,,, then on another completely separate object linkset, I would touch the outside face of another child prim and the 2nd object would move into alignment with the first object that has the face glowing, but there's a difference, if I touched the outer face of any point of the T section then it becomes stationary and when I touch the outer face of the tunnel, then the tunnel not the T section would move into alignment, but if I touched the outer face of the tunnel first, then touched the outer face of one of the T section entrances, then the tunnel would be stationary and the T section would move into alignment.

    I bought a space station kit that does just that, rez the main hub, then click on one of the door outer rim faces, and rez another section, then click on the outer face of the 2nd section's door, and the 2nd section will move and align itself with the hub,   you do this all the sections you want to add to the space station, which gave me an idea on perfectly aligning prims or creating modular builds that would align perfectly without using the object editing tools, but the station scripts are no mod.

  10. I'm looking for is a full perm script or several scripts than can take an object and align another to it on the X, Y and Z axis, an example would be tunnels with straight, curved, and intersections.

    EG.

    Rez straight tunnel, click on one of the entrance faces, this will glow to show selected, then rez the T section, and click on any of the edge faces of the T section, and the entire T section will move and rotate to align itself with the selected face facing the selected tunnel face.

    If I was an Einstein, then I would attempt to create the script(s) myself, but I'm not and hence the request.

  11. Objects are pure prim, and the linksets have a single child prim for the alignment.

    One of the objects is a 3 way T intersection, and if I wanted to align the section on the leg of the T to the existing rezzed tunnels, then I would first click the face of the exposed end of the tunnel entrance,,, then click the face of the bottom of the leg of the T, then no matter what rotation the T section is,,, it will auto align so that the leg of the T would face the existing tunnel entrance, and them move to align on the same X, Y and Z axis as the child prim on the end of the tunnel linkset.

    EG

    I have 1 straight tunnel with clickable faces at both ends, I also have a T section with clickable faces on each of the ends, I also have a curved tunnel with clickable faces at both ends, etc etc, now I rez the straight tunnel, click a face at one of the ends,,,, this will then glow to show it's selected,,,, then I would rez a T section, then click on one of the faces at one of the ends, and the T section would move and align its self to the end of the already rezzed tunnel, and the faces that were selected would stop glowing, till the next time a section is to be added.

    So, in affect which ever object face is clicked first, is the object that the other object would align to, so in other worlds, clicking the face on object 1 then clicking the face on object 2 would align object 2 to object 1, but if I clicked object 2 first, then any other object that is clicked would align to object 2.

    This is what I'm looking for in the script or scripts.

  12. OK, this is what I'm looking for,,,, I would like to be able to auto align objects just by clicking one of the faces of one object and a face of another object and they would 'snap' into place and auto align,,,, one example would be building lengthy tunnels, I would rez 2 tunnels, click the face of one of the tunnel entrances which would glow, and clicking again to cancel, then click the face of the other tunnel entrance, and the 2nd object would rotate and move to align itself with the 1st object, then I would rez a 3rd tunnel, click the face of the existing tunnel to where the 3rd tunnel would need to be placed, then click the face of the 3rd tunnel entrance, and it would rotate if needed and move to align with the rest of the tunnels.

    I know it involves an Einstein load of math, including trig, which I'm literally useless at, hence the request of a script that can do that.

  13. Don't forget me, I can't login either,,, my account has gone, and the viewer keeps saying it can't login check usename and/or password, etc etc.

     

    I guess SL has been swallowed up in the virtual black hole, where nothing can escape not even SL.

  14. These maybe old posts, but my advise is DO NOT USE ATI, they use crap, usless and only 5% of all online gaming actually makes use of it, but nVidia?, now there's  the perfec solution to all your GFX problems, 95% of every gaming system on this planet uses a GeForce card, and is so successful with them that I myself went out and got myself an nVidia card, and Second Life works 100% even on ultra, try that with an ATI.

     

    My inbuilt ATI Radeon 6350 HD GFX card was useless when in Second Life, but my nVide GeForce GTX 980 ti beats them all, I have absolutely no lag whatsoever on ultra, try that with an ATI.

  15. Seeing that this post is a question about commerce, and as there is no specific Lindex sub-forum, I have to put it here.

     

    OK, so, I want to buy some L$ through the Lindex, but the list of open sell orders show I can use an xchange rate from L256/US$1 through to L$281/US$1, and for L$10,000 at the current rate of 242.72:1 I would get charged US$40.30, but limit buying at L$10,000 with a rate of L$280/US$1 I would get charged US$36.02., but doing so, sits the order as open for weeks,,,,,sooo, how does one get more L$ for the buck within a few days?

  16. The framed animation I'm attempting to create is similar to a pulsing light, starting luminosity at 5, ending at 20, then reducing back to 5,,, thus using 7 layers, each layer = 256x256, and when blended to an animation using 1 intermediate frame, results in 12 frames (4x3), the converted 4x3 tga image (size = 1024x768) shows crisp and clear as a static image on a prim, but add the script:-

    default{ state_entry(){ llSetTextureAnim(ANIM_ON | LOOP, 1, 4,3,0,0,8); } }

    the animation goes blurry and out of focus, close up or at a distance.

    What I want to do is to have a framed animation to look clear and focused, regardless if looking at the prim from 5m or 50m, oh, and I forgot to mention, the animation is to be on a prim of any size up to 10x0.001x10

  17. I'm using Gimp to create (or should I say "attempt" to create), crisp, clear animation using frames, but it doesn't matter what size I use, the outcome of the final multi-frame image when applied to a prim face and the accompanying script applied, the animation is so blurred and out of focus, I tried various image scaling for each frame from 128x128 to 512x512 with a DPI between 72 and 1200, and I still can't get a crisp, clean, focused animtation.

  18. Looking for somewhere to raise Amaretto horses ready for selling elsewhere?

    Affordable, low lag (0%) 4096sqm flat mainland parcel @ 932 prims ideal for raising Amaretto horses.

    Close to other parcels that are also raising horses.

    Direct selling the horses from the parcel is also possible, but setting up a full size shop would not be a good idea because of the prims available.

    Affordable meaning L$1100 per week.

    Have a look around.

    http://maps.secondlife.com/secondlife/Shades%20Rest/161/92/89

×
×
  • Create New...