[Opensim-users] Change axis point

Marc Adored marc at inworlddesigns.com
Tue Nov 10 10:51:21 UTC 2009


You can also make the prim double the width and cut it in half putting
the axis to the edge then rotate. This in my experience works more
reliably then other methods.

On Tue, Nov 10, 2009 at 5:48 AM, Americo Damasceno <adamascj at gmail.com> wrote:
> 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
> Opensim-users at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-users
>
>



More information about the Opensim-users mailing list