Kale Kawabata
Registered User
Join date: 18 Sep 2005
Posts: 41
|
01-18-2006 14:31
I have a script that uses voice command to reposition an object. I want to make it work to rotate and object to a set dergee rather that reposition it to a set position relative to the parent. I tried to change to make it work for rotation but it still didnt work. Im sure its possible but im a builder not a scripter. Also would it work if i needed to rotate 5 childs against another child? I made a star wars x wing fighter and i was the wings to open on command. If theres another way you know besides this let me know or if you know a way to do this post here or IM me. Heres the script: vector pos_abierta = <1.94470, -0.00890, -0.24100>;
vector pos_cerrada = <0.28860, -0.00870, -0.23990>;
default { link_message(integer sender_num, integer num, string str, key id) { if(str == "open") { llSetPos(pos_abierta);llSay(0,"opening"); } else if(str == "close") { llSetPos(pos_cerrada);llSay(0,"closing"); } } }
_____________________
Kale Kawabata =P
|
Ben Bacon
Registered User
Join date: 14 Jul 2005
Posts: 809
|
01-19-2006 05:00
Kale - how many wing prims do you have? If you have 2 prims (one is the bottom left wing AND the top right wing) crossing in the middle, then you should be able to use llSetLocalRot instead of llSetPos. If you have 4 seperate prims, you still use llSetPos, but the problem is that you don't want the wings to rotate about their center. To do this may require dimpling. If you need help with this, please tell us what prim shape you are using for the wings, and whether or not you know how to dimple boxes.
|
Kale Kawabata
Registered User
Join date: 18 Sep 2005
Posts: 41
|
prims
01-19-2006 16:01
Each of my wings is 5 prims. The wings themself are 1 prim each but on the wing is the engine, 3 prim gun, and a engine block for looks.
_____________________
Kale Kawabata =P
|
Ben Bacon
Registered User
Join date: 14 Jul 2005
Posts: 809
|
01-20-2006 04:51
Ok - what you're looking for is heirarchical linking - but SL doesn't have it yet - go vote for proposal 607 if you want it  This would let you group the prims for each wing together and move them together as though they were a single prim - but still let you link the 4 wings together with the rest of the ship. Until then - I have heard that there are some ways of doing this - but I have no experience myself, so I'll bow out and hope someone else can help.
|