0.01 -> 0.001

Creating scripts
Post Reply
User avatar
Dundridge Dreadlow
Posts: 616
Joined: Mon May 06, 2013 2:23 pm
Location: England
Has thanked: 590 times
Been thanked: 339 times

0.01 -> 0.001

Post by Dundridge Dreadlow »

Hi, got an interesting one for you..

In world, using the viewer, I can resize an object to smaller than 1cm, all the way to 1mm. (fantastic)
However, using a script, it locks to the old 1cm limits set by SL. (not so much)

Any chance of changing this to 1mm like the viewer ?
ImageImageImageImageImageImage
PS. Kitely is awesome.
User avatar
Ilan Tochner
Posts: 6545
Joined: Sun Dec 23, 2012 8:44 am
Has thanked: 5014 times
Been thanked: 4487 times
Contact:

Re: 0.01 -> 0.001

Post by Ilan Tochner »

Hi Dundridge,

What functions are you calling?
User avatar
Dundridge Dreadlow
Posts: 616
Joined: Mon May 06, 2013 2:23 pm
Location: England
Has thanked: 590 times
Been thanked: 339 times

Re: 0.01 -> 0.001

Post by Dundridge Dreadlow »

The main one I'm interested in is in llSetLinkPrimitiveParametersFast under PRIM_SIZE.
Limits are described in llSetScale. It is fascinating that megaprims via script is enabled but smaller isn't.

Code: Select all

// Super Simple Scale/PRIM_SIZE test
// Dundridge Dreadlow, July 2013
// Just for fun

float s=0.1;

default
{
    state_entry()
    {
        llSetText("Click Me",<1,1,1>,1);
    }
    touch_start(integer ct)
    {
        vector r=<1,1,s>;        
        llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_SIZE, r]);        
        llSetText("Requested "+(string)r+"\nGot "+(string)llGetScale(),<1,1,1>,1);
        s=s/2.0;
        if (s<0.001)
            s=0.1;
    }
}
ImageImageImageImageImageImage
PS. Kitely is awesome.
User avatar
Dundridge Dreadlow
Posts: 616
Joined: Mon May 06, 2013 2:23 pm
Location: England
Has thanked: 590 times
Been thanked: 339 times

Re: 0.01 -> 0.001

Post by Dundridge Dreadlow »

Thanks everso for putting this in the latest build, makes a HUGE difference to me :) :D

(...and it blows away another limitation :))
ImageImageImageImageImageImage
PS. Kitely is awesome.
User avatar
Ilan Tochner
Posts: 6545
Joined: Sun Dec 23, 2012 8:44 am
Has thanked: 5014 times
Been thanked: 4487 times
Contact:

Re: 0.01 -> 0.001

Post by Ilan Tochner »

You're welcome Dundridge, we aim to please :-)
Post Reply