CODE
llSetPos(llGetPos() *2);
Which gets the currect position and multiplies each (x,y,and z) by 2 and sets the prim to that position.
How do I just set the z position?
These forums are CLOSED. Please visit the new forums HERE
Moving a prim up using llSetPos |
|
|
MadamG Zagato
means business
Join date: 17 Sep 2005
Posts: 1,402
|
03-06-2006 20:14
I tried
CODE llSetPos(llGetPos() *2); Which gets the currect position and multiplies each (x,y,and z) by 2 and sets the prim to that position. How do I just set the z position? |
|
BushidoBrown Hightower
lat 42.36 / long -71.05
Join date: 16 Feb 2006
Posts: 31
|
03-06-2006 20:25
..forgive me, because I'm new, but I think you can use a getpos.x, getpos.y, getpos.z, where:
CODE
Then you could manipulate each more directly since llGetPos() returns region coordinates relevant to SW corner of the sim. Hopefully someone can drop some science to give you more specifics though. |
|
Logan Bauer
Inept Adept
Join date: 13 Jun 2004
Posts: 2,237
|
03-06-2006 20:26
vector pos = llGetPos();
llSetPos(<pos.x,pos.y,pos.z*2> ;edit > whoops, what Bertha said below, too. ![]() _____________________
![]() PICS - BLOG - http://arcticgreenhouse.blogspot.com/ XSTREET - INWORLD -http://slurl.com/secondlife/Alternate Reality/144/138/54/ |
|
Bertha Horton
Fat w/ Ice Cream
Join date: 19 Sep 2005
Posts: 835
|
03-06-2006 20:54
Actually it's
vector pos = llGetPos(); llSetPos(<pos.x,pos.y,pos.z*2> ; ![]() (Wait, how do you put a smiley in LSL?) Bear in mind, though, that multiplying by two does not double the distance from ground level, if that's what you had in mind. |
|
MadamG Zagato
means business
Join date: 17 Sep 2005
Posts: 1,402
|
03-06-2006 21:12
Thanks a million! Works great guys!
![]() |
|
MadamG Zagato
means business
Join date: 17 Sep 2005
Posts: 1,402
|
03-06-2006 21:47
Darn, doesn't wwork in a linked prim.
![]() |
|
Plastic Spoonhammer
Registered User
Join date: 9 Feb 2006
Posts: 20
|
03-06-2006 21:59
Darn, doesn't wwork in a linked prim. ![]() llSetPos() should work just fine for moving a linkset (you'll likely want the script calling it to be in the root prim, of course). Are you sure the multiplication isn't your problem? I suspect you meant to *add* two to z, rather than *multiply*. llSetPos will only move an object a maximum of 10 meters, which means your object's z must be 0 < z < 5 for your code to work, and it's awfully likely you are outside that range. - P. Spoonhammer |
|
MadamG Zagato
means business
Join date: 17 Sep 2005
Posts: 1,402
|
03-06-2006 23:49
Thanks,
Ziggy came and straightened me out. I should have used llGetLocalPos instead of llGetPos. LOL ![]() |
|
Geoff Gavaskar
who, me?
Join date: 29 Dec 2005
Posts: 21
|
Moving one prim in a linked set?
03-08-2006 10:26
Wait...is it possible to move one prim of a linked set...and not move the whole group? I've been struggling with this...and settled on unlinking everything and just communicating to the different (formerly-linked) prims via chat...but there has gotta be a better way!
I want to basically make a conference room wall -- accordian style -- that expands and contracts...it would be best if all parts were linked, but I can't figure out how to move one object...how does llGetLocalPos() help in this case? |
|
Static Sprocket
Registered User
Join date: 10 Feb 2006
Posts: 157
|
03-08-2006 10:34
I want to basically make a conference room wall -- accordian style -- that expands and contracts...it would be best if all parts were linked, but I can't figure out how to move one object...how does llGetLocalPos() help in this case? My understanding was that if a child prim called llSetPos() it would just move that one child prim. And if the root prim calls llSetPos(), it moves the entire linkset. I haven't actually tried this yet, could I get confirmation from those more experienced? |