Jump to content

Flipping a prim 180 degrees


SimplifyKidd
 Share

Recommended Posts

Use Innula's script, but be prepared for a surprise.  You asked

1 hour ago, SimplifyKidd said:

how to flip a simple 1 prim card from it's back to it's front

which should mean rotating on either the Y axis (as Innula wrote it) or the X axis.  But then you wrote that you wanted

1 hour ago, SimplifyKidd said:

a simple script that flips a prim 180 degree on the Z-axis

which is neither of those (unless, of course, you have built a funny playing card).

  • Like 1
Link to comment
Share on other sites

  • 1 year later...
On 9/17/2018 at 11:30 AM, Innula Zenovka said:

Depends which axis you want to flip it on, of course, but try something like this


rotation rRot;
vector vAxis = <0.0,PI,0.0>;
default
{
    state_entry()
    {
        rRot = llEuler2Rot(vAxis);  
    }

    touch_start(integer total_number)
    {
       llSetRot(rRot * llGetRot());
    }
}

 

I am trying this attached to hud, but it only flips 90 degrees, then doesnt do anything.  Do scripts work differently on a hud?  

Link to comment
Share on other sites

  • 3 years later...

I found this thread because I am trying to make a Business Card that you can flip from front to back. It is attached like a HUD. I used the script at the top and it worked on the card when it is rezzed but when I attach it, it only flips 90 degrees and then won't let it flip again when touched. (See attached Gyazo)

https://gyazo.com/1a7d184d9fb4d56cac6e6918b896f591

I am sure that it has something to do with it being like a HUD but I am not sure how to change the script to make it work as a HUD. Any suggestions??

I read the HUD article above but I am so new to scripting that I am not sure where to insert the llSetLocalRot (rRot * llGetLocalRot()); in the existing script to make it work.

Thanks for the help!!

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...