Jump to content

is it possible to push an object in a circle


VirtualKitten
 Share

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

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

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 comment
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 comment
Share on other sites

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