|
Gryphon Stonebender
Registered User
Join date: 25 Jan 2005
Posts: 24
|
02-05-2007 17:19
Ok so I have tried this using: llSetPrimitiveParams([PRIM_SIZE, <0.5, 0.010, 0.5>] ); and when clicked the object grows or changes to this: llSetPrimitiveParams([PRIM_SIZE, <0.5, 0.010, 1.0>] );
While this does what it says it will do I am trying to make the opject grow in height and and not change its position. THis changes the X axis size but re centers the opject as it should. I know ther ehas to be a way to make it appear as if object is growingf taller without adjusting it's position?
any suggestions would be great. I am sur eit is something simple I am forgetting...
|
|
Seifert Surface
Mathematician
Join date: 14 Jun 2005
Posts: 912
|
02-05-2007 17:25
I think what you're saying is that you want one side of the object to move (make the object grow) but the other side stay stationary. If so then the center of the object must move as well. Assuming your object is at zero rotation, try:
llSetPrimitiveParams([PRIM_SIZE, <0.5, 0.010, 0.5>] );
and on touch:
llSetPrimitiveParams([PRIM_SIZE, <0.5, 0.010, 1.0>, PRIM_POSITION, llGetPos() + <0,0,0.25>] );
_____________________
-Seifert Surface 2G!tGLf 2nLt9cG
|
|
Gryphon Stonebender
Registered User
Join date: 25 Jan 2005
Posts: 24
|
02-05-2007 17:35
ahh yes ok that does seem to do it... almost... when I click agan it goes back to the smaller size, but it "walks up the wall" if you will. keep raising up in the air with every click. I woudl liek iy to stay in one position but raise up and then back down.. think of a fire.. clciking makes the flames "grow" and then clicking again makes them small, but all without moving...
this is certainly closer and on the right path... maybe llSetScale?
|
|
Gryphon Stonebender
Registered User
Join date: 25 Jan 2005
Posts: 24
|
02-05-2007 17:40
Ok I think I have it... integer open = FALSE;
default { state_entry() { }
touch_start(integer total_number) { if (!open) { llSetPrimitiveParams([PRIM_SIZE, <0.5, 0.010, 0.5>, PRIM_POSITION, llGetPos() + <0,0,-0.25>] ); open = TRUE; } else { llSetPrimitiveParams([PRIM_SIZE, <0.5, 0.010, 1.0>, PRIM_POSITION, llGetPos() + <0,0,0.25>] ); open = FALSE; } } }
|
|
Seifert Surface
Mathematician
Join date: 14 Jun 2005
Posts: 912
|
02-05-2007 17:41
No, llSetScale will do the same as PRIM_SIZE, you need the position change as well. To shrink again you'll need to add a PRIM_POSITION, llGetPos() - <0,0,0.25> to the other guy.
_____________________
-Seifert Surface 2G!tGLf 2nLt9cG
|
|
Gryphon Stonebender
Registered User
Join date: 25 Jan 2005
Posts: 24
|
02-05-2007 17:42
Thanks for the help Seifert!
|