Rotating Attached Items?
|
a lost user
Join date: ?
Posts: ?
|
09-01-2005 17:12
Is it possible to have a script rotate items that are attached? I made a pair of flapping wings. They work fine when rezzed in the world. However, they do not flap when attached. I've read a separate thread about having wings in different possitions and turning them on and off in order. While I could go back and do that, I'd still like to know if it's possible to animate attached items.
|
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
|
09-01-2005 17:21
AFAIK, no - movement and rotation function calls don't work on attachments. I can understand why you wouldn't want an attached object to be able to move on its own, but letting it rotate would be cool, and would allow for some fun effects, like flapping wings. But I'm sure there's a good reason why it isn't allowed.
Turning wings on and off is one way to do it. I briefly considered a different way - rez an unattached pair of wings at the correct position, and then those could flap/open-close nicely, with smooth physical movements if needed. But the problem there is dealing with a moving avatar. The avatar would have to stand still while he opened/closed/flapped his wings. I tried making a follower object that would stay at a specific offset behind me, but that never reacts quickly enough to make it look like it's an attachment, you always have the avatar move and then the object move to catch up. And that still leaves the problem of sim boundary crossings or teleports - I'm not sure if a follower object would keep up cleanly.
You could do this for temporary effects, like opening/closing. Display the attached/closed wings. Turn them off, rez the unattached wings, make them go through the opening movement. Kill the unattached wings, turn on the open/attached wings. Tell the avatar to stand still while he issues the command to initiate this sequence. It might work, if you rezzed the unattached wings so they exactly overlapped the attached wings at their open/closed positions. But this probably won't work for wings flapping while someone is flying.
|
a lost user
Join date: ?
Posts: ?
|
Thanks
09-01-2005 17:35
Ziggy - Thanks for the detailed response. I figured that would be the case when I saw they weren't flapping while attached. That was pretty much the only explanation, I just didn't want to believe it until someone told me! Well, back to the drawing board - I'm not overly disappointed as I'm still learning more about how the LSL language works and interprim communication. Alendril Mullen
|
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
|
09-01-2005 17:45
Well, there could be other ways around it that I don't know of, I'm pretty new here. But the Wiki does say that calls to position/rotation functions will fail silently in an attached object.
|
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
|
09-01-2005 19:46
llSetPos, llSetRot, and related functions fail on attached objects.
llSetScale works, though.
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
09-02-2005 03:34
Most apparently animated attachments (there are some) use llSetTextureAnim(). I'm not much of an animator (in the cartoon sense) but that's the sort of approach that seems to work best. I suspect if you're good at animations there are good ways to do it, I know I briefly played with one in Flash with tweening, looked at each frame and took a snapshot and used that - it plays really quite well, but mine was a square morphing into a circle, I really don't have that skill. I'm pretty sure that a good animator could do flapping wings etc. There's another way too, with a multiprim attachment and then using a script to flick between alphas on the various things - this is a variation on the animated textures approach, but possibly gives you a better 3D effect, the wings really do move (at least the prims they are displayed on have different positions) so it ought to work OK from many places.
|
Kurt Zidane
Just Human
Join date: 1 Apr 2004
Posts: 636
|
09-02-2005 09:11
but it will work with hud attachments! 
|
Beatfox Xevious
is THOUSANDS OF PEOPLE
Join date: 1 Jun 2004
Posts: 879
|
09-03-2005 01:20
Apparently in 1.7, you can use llSetPos, llSetRot, and llTargetOmega on any attachment. I'm in preview right now wearing a smoothly rotating tail. This is a MAJOR boon for av creativity... one many of us have been desiring for a loooong time. And they don't even mention it! 
_____________________
My Beatworks: Zephyr Chimes wind chimes, the KanaMaster Japanese kana tutor, and the FREE Invisibility Prim Public. Look for them at the Luskwood General Store in Lusk (144, 165).
"You have been frozen. You cannot move or chat. A pony will contact you via instant message (IM)." - mysterious system message I received after making off with Pony Linden
|
Ardith Mifflin
Mecha Fiend
Join date: 5 Jun 2004
Posts: 1,416
|
09-03-2005 01:51
From: Beatfox Xevious Apparently in 1.7, you can use llSetPos, llSetRot, and llTargetOmega on any attachment. I'm in preview right now wearing a smoothly rotating tail. This is a MAJOR boon for av creativity... one many of us have been desiring for a loooong time. And they don't even mention it!  Wow! That is amazing news! I can't wait to get in-world and give it a shot.
|
Torley Linden
Enlightenment!
Join date: 15 Sep 2004
Posts: 16,530
|
09-03-2005 01:56
Whoa... I'm lookin' forward to that!!!
|
Blain Candour
Registered User
Join date: 17 Jun 2005
Posts: 83
|
09-03-2005 07:57
I noticed that myself. Even omega rotation sort of works (in a wonky way and only if it is spinning before attached). I have submitted multiple bug reports relating to weirdness in the new attachment freedom but I like it to be sure. I imagine it is a byproduct of the HUD attachment point. By the way you can go into edit mode on hud and then alt zoom out to see things that would be off screen. full firefox browser integration + hud view + attachment freedom is going to be an awesome combination. imagine on touch hud displays that flip into and out of view. Tabbed browsing on steroids.
_____________________
DISCLAIMER: Blain Candour is a total and eternal n00b and everything he tells you should be taken with a huge pile of salt. Especially when he refers to himself in third person!
|