Don't click here unless you want to be banned.

LSL Wiki : CharlesFauna

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are ia360925.us.archive.org
Basically, I do lots of scripting, and avoid modelling whenever possible. I'd like to think my scripting abilities are pretty good, but I don't really have anything to base this on, as most things I see around SL are just clothing stores wtf.

Sometimes I create a function or simple script that I think would be useful and distribute it around for free, but I also tend to charge for some more advanced things or other random commissioned scripts.

Here is a function I wrote for physical object movement. It slowly corrects the object's velocity to a desired velocity, when called repeatedly in a loop. This gives the effect of smooth transitions between velocities, while not relying on any more advanced scripts that might not work when an object is attached or something.

Feel free to IM me in-game with any questions, comments, etc you may have. You can also find me, more often than not, hanging out at the Makai, located at around (220, 100) in Amida.

vel is the desired velocity, str is how much to correct the current velocity. 0 means to do nothing, 1 means to suddenly stop moving in the current trajectory and go instantly to the desired, if energy is available. Call this function repeatedly in an evenly timed loop.
cfCorrectVelocity(vector vel, float str)
{
    if (str > 1) // Don't overdo it.
        str = 1;
    if (str < 0) // Do nothing if no strength!
        return;

    vector retro = llGetVel() * -str;
    vector pro = vel * str;

    llApplyImpulse((retro + vel) * llGetMass(), FALSE);
}
There is no comment on this page. [Display comments/form]