Jump to content

is it possible to push an object in a circle


Recommended Posts

Please ignore wolfies version I am guessing again from his previous show boat he did that he is  not doing the same thing as usual as the code my college and me are testing why are you bothering to waste time writing something different you are not teaching anyone anything wolfie  . The last time he said he could do something his code was totally different . I did ask you not to comment on my threads Wolfie as you gave no help! I have now put you on ignore sorry but i have asked you not to do this.

Anyway his video showed no movement of the centre item so I know he is not using collision or PushObject as when you bump an item it has wobble on it at the size of mass he had. 

Edited by VirtualKitten
i forgot something
Link to post
Share on other sites

I am still getting this side affect of a big push at the start of the collision it doesn't matter what i do to remove it latest code used a bigger item  with bigger mass and cylindrical Se video the Timer gave a delay that got the circle walk but to far away from the item  as the initial push is still to high which we cant seem to avoid.

rotation rot3ToQuat(vector deg) {
    return(llEuler2Rot(deg*DEG_TO_RAD));
}
float  magnitude = 5.0;
default
{
    state_entry()
    {
        llSetText("",<1.0,1.0,1.0>,1.0);
    }
    collision_start(integer num_detected)
    {
         float  iv     = 20.0; 
         integer count= (360/(integer)iv)+(integer)iv;
              // interval in degrees each cycle
;
        vector i3rot = ZERO_VECTOR;  // Starting rotation in degrees XYZ.
        vector origin = llGetPos();  // Take this to be the circle origin, for the sake of example.
        vector iForceVec;
        float ObjMass = llGetObjectMass( llDetectedKey(0));
        float boxMass = llGetMass();
        llSetTimerEvent(2);
        while(count--) {
            i3rot.z += iv;
            if(i3rot.z >= 360.0) i3rot.z = 0.0;
                        
            iForceVec = <magnitude,0.0,0.0>*rot3ToQuat(i3rot-<0.0,0.0,90.0>);
            llSetForceAndTorque(<0.0,0.0,0.0>,<0.0,0.0,0.0>,TRUE);
            // for demo purposes only.
            llSetText((string)i3rot 
                + "\nForce: " + (string)iForceVec
                + "\n Energy: " + (string) llGetEnergy()
                +"\n Mass: "+(string)llGetMass()+  " lindogram = 100kg."
                + "\nMag: " + (string)llVecMag(iForceVec),<1.0,1.0,1.0>,1.0);
           llPushObject(llDetectedKey(0),iForceVec,<0.0,0.0,0.0>,TRUE);
            llSleep(.2);
           // if(count <365) magnitude = 255.0;
        }
         llSetText("",<1.0,1.0,1.0>,1.0);
    }
    timer()
    {
        magnitude = 255.0;
    }
}

 

CODE

 

Edited by VirtualKitten
Link to post
Share on other sites
7 hours ago, VirtualKitten said:

@Andrew Linden

Ok I have had another look at this and put llGetEnergy() into script to determine if the system has full energy which it does 1.0  at all times

 

seeing your latest video. The script is measuring the energy of the box. When the box is non-physics its energy is always 1.0

 

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...