|
Django Yifu
Beat Island Gaffer
Join date: 7 May 2007
Posts: 189
|
11-07-2007 16:09
I am trying to create an attachment that is carried in the hand but that always aligns it's z axis with the global z. Basically as you walk I want the base of the attachment to remain pointing down regardless of arm swing. I've tried using both llsetrot and llrotlookat but I'm having trouble getting the attachment to rotate properly. Either it aligns to the avatars arm and spins on the objects z axis or it aligns to the world but spins on the y or x axis as the avatar rotates I thought when I started out that getting an attachment to just point down all the time would be easy but I should know better with LSL. Any tips on attachment rotations would be great 
_____________________
Tread softly upon the Earth for you walk on my face.
|
|
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
|
11-07-2007 18:05
From: Django Yifu I am trying to create an attachment that is carried in the hand but that always aligns it's z axis with the global z. Basically as you walk I want the base of the attachment to remain pointing down regardless of arm swing. I've tried using both llsetrot and llrotlookat but I'm having trouble getting the attachment to rotate properly. Either it aligns to the avatars arm and spins on the objects z axis or it aligns to the world but spins on the y or x axis as the avatar rotates I thought when I started out that getting an attachment to just point down all the time would be easy but I should know better with LSL. Any tips on attachment rotations would be great  All you can do is rotate relative to the attachment - attachment points can't find their rotation relative to the world, because animations are a client side effect. Each attachment assumes it exists in a single location up your butt, and all it can ever know is your butt's rotation and position, and its own rotation relative to its attachment point, but not relative to your butt.
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
11-07-2007 19:54
or in easier terms, the attachment only knows where you are,but not where it is in relation to you (only to the attachment point which is moved by anims)
it knows which way you're facing, but can't tell which way it's facing relative to you (only to the attachment point which is moved by anims)
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Django Yifu
Beat Island Gaffer
Join date: 7 May 2007
Posts: 189
|
11-08-2007 10:10
Yeah. Ithought that was probably why scripts that rotate other objects properly were not working regardless of the changes I made. Shame really.
This is wildly speculative but could an adaptation of multi move be used so that the controlling prim was attached and it told another prim to follow it that could be rotated in a global way? Or do we have the same problem...the attachment is up your but as far as the server is concerned?
_____________________
Tread softly upon the Earth for you walk on my face.
|
|
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
|
11-08-2007 10:49
The only way to make it work guaranteed is to use an animation that keeps the attachment at a known rotation or position.
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
11-08-2007 13:36
From: Django Yifu Yeah. Ithought that was probably why scripts that rotate other objects properly were not working regardless of the changes I made. Shame really. This is wildly speculative but could an adaptation of multi move be used so that the controlling prim was attached and it told another prim to follow it that could be rotated in a global way? Or do we have the same problem...the attachment is up your but as far as the server is concerned? I think that was tried, with a simple follow script before... and I think the result was as you've deduced... attachment position = hip center for purposes of detection...
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
11-08-2007 14:04
I am patting myself on the back because so far I have resisted the urge to make some naughty reply about this thread title.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|