You don't need to change any axis to do a pivoting door. You need to create
two parts of the door. The first will have only the dimensions to be the
"axis".The second will be the "real" door. Linking this one with the first,
you can add this script to the object:
integer open;
rotation rotActual ;
rotation rot ;
vector iniPos;
default{
state_entry(){
iniPos=llGetPos();
if(iniPos.y<140){ // y of the door closed
open = 0;
}
else open=1;
}
touch_start(integer i){
if(open==0){
rotActual = llGetRot();
rot = llEuler2Rot(<0,0,-90>*DEG_TO_RAD);
llSetRot(rotActual*rot);
llSetPos(llGetPos());
open=1;
iniPos=llGetPos();
}
else{
rotActual = llGetRot();
rot = llEuler2Rot(<0,0, 90>*DEG_TO_RAD);
llSetRot(rotActual*rot);
llSetPos(llGetPos());
open=0;
iniPos=llGetPos();
//llOwnerSay((string)iniPos.y);
}
}
}
You can see this solution working on my sim at http://200.207.267.61:9000,
using the userID: Guest One, pw:123456
There are some other scripts there.
_______________________________________________
Opensim-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/opensim-users