Bret Hornet
Registered User
Join date: 6 Jun 2005
Posts: 29
|
06-13-2005 20:35
I created an object (link set) by linking two objects that were composed of multiple prims. I want to have one group break away from the other but stay linked themselves. Basically so I have two objects separate from each other.
I've tried combinations of llBreakLink and llBreakAllLink that result in either one prim fall off (the one with teh script) or the entire object unlinking and falling into a pile of prims on the floor.
Anyway to unlink a group of prims and keep them together?
|
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
|
06-13-2005 20:40
Yep. Two ways: 1) Disable Physics on the linked set. 2) If you simply must use physics, consider using llMoveToTarget and llRotLookAt to keep everything together.
_____________________
---
|
Bret Hornet
Registered User
Join date: 6 Jun 2005
Posts: 29
|
06-13-2005 21:06
What if said object is moving?
|
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
|
06-13-2005 21:09
If you know their relative positions, you can write something more elaborate to keep them "virtually linked" up until the point you can link them together again. Really, that just means using llMoveToTarget/llRotLookAt or equivalent to approximate their positions. A good way to do this, once unlinked, would be to just do this: changed(integer change) { if(change & CHANGED_LINK) { llMoveToTarget(llGetPos(),0.3); llRotLookAt(llGetRot(),0.3,0.3); } }
In theory, that would have the stuff "stick" to that point in space. To have it then move, you could just synchronize it off a timer or link it back together again.
_____________________
---
|
Bret Hornet
Registered User
Join date: 6 Jun 2005
Posts: 29
|
06-13-2005 21:15
That's not a bad idea, and i may be able to do that. I guess my original problem was though I have two objects that I'm putting together. It seems once I link them there's no memory of those two separate objects anymore. I want to be able to link and split the two objects at will and then do some other stuff with them. I'll play around with the llMoveToTarget and llRotLookAt to see if I can get what i want. Thanks for the help so far, any more suggestions are welcome! 
|