2009年08月02日
開閉ドア
こんばんわ。
タッチで開閉するドアについてなのですが、ドアの開閉するスピードを遅くすることは出来ますでしょうか?
バタン、と開くのではなく、ギ~~~~とゆっくり開かせたいのですが…
ドア自体のスクリはFreeのもので下記のものを左右に入れて両開きドアとして使います。
string notecard = "doorini"; // name of the notecard
integer line = 0;
key request_id1;
rotation new_rot;
rotation startrot;
integer door_pos;
dooropen(){
if (door_pos == 1)
{
rotation x_90 = llEuler2Rot( <0,0,-90 * DEG_TO_RAD> );
new_rot = llGetLocalRot()* x_90 ; // compute global rotation
llSetLocalRot(new_rot);
door_pos = 0;
}
}
doorclose(){
if (door_pos == 0)
{
rotation x_90 = llEuler2Rot( <0,0,90 * DEG_TO_RAD> );
new_rot = llGetLocalRot() * x_90 ; // compute global rotation
llSetLocalRot(new_rot);
door_pos = 1;
}
}
default
{
state_entry()
{
door_pos = 1;
vector startPoint = llGetPos();
startrot = llGetRot();
// distance to the point of rotation should probably be a
// function of the max dimension of the object.
}
touch_start(integer total_number)
{
if (door_pos == 1){
dooropen();
llMessageLinked(LINK_ALL_OTHERS, llGetLinkNumber(), "openOK", llDetectedKey(0));
}else if (door_pos == 0 ){
doorclose();
llMessageLinked(LINK_ALL_OTHERS, 0, "close", "");
}
}
link_message(integer sender_num, integer num, string str, key id)
{
if (str == "openOK"){dooropen();}
if (str == "close"){doorclose();}
}
}
宜しくお願いします。
タッチで開閉するドアについてなのですが、ドアの開閉するスピードを遅くすることは出来ますでしょうか?
バタン、と開くのではなく、ギ~~~~とゆっくり開かせたいのですが…
ドア自体のスクリはFreeのもので下記のものを左右に入れて両開きドアとして使います。
string notecard = "doorini"; // name of the notecard
integer line = 0;
key request_id1;
rotation new_rot;
rotation startrot;
integer door_pos;
dooropen(){
if (door_pos == 1)
{
rotation x_90 = llEuler2Rot( <0,0,-90 * DEG_TO_RAD> );
new_rot = llGetLocalRot()* x_90 ; // compute global rotation
llSetLocalRot(new_rot);
door_pos = 0;
}
}
doorclose(){
if (door_pos == 0)
{
rotation x_90 = llEuler2Rot( <0,0,90 * DEG_TO_RAD> );
new_rot = llGetLocalRot() * x_90 ; // compute global rotation
llSetLocalRot(new_rot);
door_pos = 1;
}
}
default
{
state_entry()
{
door_pos = 1;
vector startPoint = llGetPos();
startrot = llGetRot();
// distance to the point of rotation should probably be a
// function of the max dimension of the object.
}
touch_start(integer total_number)
{
if (door_pos == 1){
dooropen();
llMessageLinked(LINK_ALL_OTHERS, llGetLinkNumber(), "openOK", llDetectedKey(0));
}else if (door_pos == 0 ){
doorclose();
llMessageLinked(LINK_ALL_OTHERS, 0, "close", "");
}
}
link_message(integer sender_num, integer num, string str, key id)
{
if (str == "openOK"){dooropen();}
if (str == "close"){doorclose();}
}
}
宜しくお願いします。
2009年08月02日
至近距離でスカルプが消えてしまう
スカルプを使用してアクセサリーを製作しています。
遠距離(正常に見える)

近距離(一部欠けて見えてしまう)

題記の通り、カメラを近づけるとスカルプの一部が表示されなくなってしまいました。
現象を確認したのは1.23へのアップデータ後で、1.22中は正常に確認できていました。
(現在使用しているのは Second Life 1.23.4 (123908) Jun 11 2009 15:16:56 (Second Life Release))
バージョンアップに伴い、スカルプの表示(個数制限制限?コスト?)について何か変更があったのでしょうか。
回避方法などありましたら、教えていただけないでしょうか。
どうぞよろしくおねがいします。
遠距離(正常に見える)

近距離(一部欠けて見えてしまう)

題記の通り、カメラを近づけるとスカルプの一部が表示されなくなってしまいました。
現象を確認したのは1.23へのアップデータ後で、1.22中は正常に確認できていました。
(現在使用しているのは Second Life 1.23.4 (123908) Jun 11 2009 15:16:56 (Second Life Release))
バージョンアップに伴い、スカルプの表示(個数制限制限?コスト?)について何か変更があったのでしょうか。
回避方法などありましたら、教えていただけないでしょうか。
どうぞよろしくおねがいします。