Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llSetPrimitiveParams question

sirhc DeSantis
Registered User
Join date: 8 Jan 2007
Posts: 60
05-31-2007 12:08
OK this is driving me nuts. I've got a panel (basically a flattened box) that I want to use as a simple door by changing the size of its 'hollow' parameter. To open it I'm trying to use :

llSetPrimitiveParams( [ PRIM_TYPE, PRIM_TYPE_BOX , PRIM_HOLE_DEFAULT, ZERO_VECTOR, 0.95, ZERO_VECTOR, ZERO_VECTOR, ZERO_VECTOR ] );

and to close it :

llSetPrimitiveParams( [ PRIM_TYPE, PRIM_TYPE_BOX , PRIM_HOLE_DEFAULT, ZERO_VECTOR, 0.0, ZERO_VECTOR, ZERO_VECTOR, ZERO_VECTOR ] );

I had this working before but now opening it changes the prims taper values to 1.0 (x and y) so when you close it again what was square is now triangular. However the docs don't even mention taper as an option. Am I missing something obvious here?

Thanks
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
05-31-2007 12:46
First problem:

Cut defaults to <0.0,1.0,0.0>, not ZERO_VECTOR.

Second problem:

Taper ranges from <0.0,0.0,0.0> to <2.0,2.0,0.0>, where <1.0,1.0,0.0> is 0.0 taper for X and Y. Weird, I know, but that's the way it works.
sirhc DeSantis
Registered User
Join date: 8 Jan 2007
Posts: 60
thanks
05-31-2007 13:55
OK I'll try that. But if 1.0 is the mid point for the taper para how come when I reset them manually back to zero I get my square back?
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
05-31-2007 14:20
Because the values for Taper you set in the object editor don't reflect the same values you use in the scripted call. That's what I meant by "weird".

In the editor, TaperX/TaperY = 0.0 is <1.0,1.0,0.0> to llSetPrimitiveParams().
sirhc DeSantis
Registered User
Join date: 8 Jan 2007
Posts: 60
weird
05-31-2007 14:46
Weird indeed ! Well I'm having no luck with it but I have to get on with the rest of the build so I'll play with that later. Thanks for the help.
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
05-31-2007 15:10
The discrepancy between edit box values and script values is because "taper" used to be called "top size", for which 1.0 was full size, 0.0 was fully tapered, and did not allow negative numbers to change which end gets reduced. The range in script was extended to 2.0 so that existing scripts wouldn't be broken by the change.
sirhc DeSantis
Registered User
Join date: 8 Jan 2007
Posts: 60
taper
05-31-2007 15:44
Actually that does make sense - thanks :)