|
Yingzi Xue
Registered User
Join date: 11 Jun 2008
Posts: 144
|
08-26-2008 18:11
I'm working on a mailbox that has a red mail flag that raises when someone drops a notecard in it. The rotation works fine, but I'm thinking of selling the mailbox. Is there a way to update the rotation and have the flag rotate properly if the rotation changes on the next rez? Also, I had to have the flag unlinked from the rest of the mailbox because it consists of three prims. I'm assuming if I linked the flag to the rest of the mailbox I would have to rotate the flag pieces manually, which wouldn't look uniform. I'm looking for a solution that will allow my four-prim flag to rotate up correctly no matter what the rotation is changed to on the next rez. Right now I'm storing the position before any rotation occurs and I'm using it to go back to the original position. I am using Euler to do a 90 degree rotate and it's causing the flag to rotate wrong because the axis changes. Your help is appreciated.
|
|
arton Rotaru
Registered User
Join date: 27 Aug 2007
Posts: 43
|
08-26-2008 19:30
Try this:
rotation rot = llEuler2Rot(<0.0,0.0,90.0> * DEG_TO_RAD) * llGetRot(); llSetRot(rot);
A flag made of one sculpted prim can help to link it all together. In that case you use llGetLocalRot() and SetLocalRot().
|
|
Yingzi Xue
Registered User
Join date: 11 Jun 2008
Posts: 144
|
08-27-2008 03:23
That did the trick. I was using the wrong axis.
|
|
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
|
08-27-2008 03:32
From: Yingzi Xue I'm working on a mailbox that has a red mail flag that raises when someone drops a notecard in it. The rotation works fine, but I'm thinking of selling the mailbox. Is there a way to update the rotation and have the flag rotate properly if the rotation changes on the next rez? The easy way is to make two flags, one in each position and then make the one flag you don't want to look at transparent  I know your question was about a rotation, but if this will do it is much simpler, no moving parts are involved.
_____________________
From Studio Dora
|
|
Yingzi Xue
Registered User
Join date: 11 Jun 2008
Posts: 144
|
08-27-2008 07:36
Dora,
Thanks for the tip. I didn't think of that.
|