SimplifyKidd Posted September 17, 2018 Share Posted September 17, 2018 Sorry for posing such a basic question, but I can't figure out how to flip a simple 1 prim card from it's back to it's front. Can anybody point me to a simple script that flips a prim 180 degree on the Z-axis when the prim is touched? Link to comment Share on other sites More sharing options...
Innula Zenovka Posted September 17, 2018 Share Posted September 17, 2018 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()); } } 1 Link to comment Share on other sites More sharing options...
Rolig Loon Posted September 17, 2018 Share Posted September 17, 2018 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). 1 Link to comment Share on other sites More sharing options...
SimplifyKidd Posted September 17, 2018 Author Share Posted September 17, 2018 That was just what I needed! Thanks! I just moved PI to the Z-axis, and with the front of the card being face 1 (facing up) it just worked like a charm ? I have attached a picture of my cards if my description was confusing. 1 Link to comment Share on other sites More sharing options...
Lucia Nightfire Posted September 17, 2018 Share Posted September 17, 2018 Two different people with the same handwriting? ? Link to comment Share on other sites More sharing options...
Madelaine McMasters Posted September 17, 2018 Share Posted September 17, 2018 4 hours ago, Rolig Loon said: (unless, of course, you have built a funny playing card). 1 Link to comment Share on other sites More sharing options...
Rolig Loon Posted September 17, 2018 Share Posted September 17, 2018 21 minutes ago, Lucia Nightfire said: Two different people with the same handwriting? ? Alts. 2 Link to comment Share on other sites More sharing options...
SimplifyKidd Posted September 18, 2018 Author Share Posted September 18, 2018 Well, now that I can flip the card, I can show you the back side that clearly states that the card has NOT been signed by Clark Middelton ? Take care! Link to comment Share on other sites More sharing options...
Anne Zapedzki Posted May 17, 2020 Share Posted May 17, 2020 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 More sharing options...
Nova Convair Posted May 17, 2020 Share Posted May 17, 2020 You didn't find more old threads to revive I hope? PI is 180° but you don't rotate huds with a global rotation, so it's: llSetLocalRot (rRot * llGetLocalRot()); 1 Link to comment Share on other sites More sharing options...
Rolig Loon Posted May 18, 2020 Share Posted May 18, 2020 And a HUD is always seen in its Y-Z plane, with the local +X axis pointing directly away from you, so you are seeing the back (-X) side. Read http://wiki.secondlife.com/wiki/Creating_HUDs Link to comment Share on other sites More sharing options...
Kylerra Nayar Posted April 6 Share Posted April 6 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 More sharing options...
Rolig Loon Posted April 6 Share Posted April 6 Follow Nova's advice (above) and it should work fine. Her llSetLocalRot command replaces the original in the touch_start event. Link to comment Share on other sites More sharing options...
Kylerra Nayar Posted April 6 Share Posted April 6 Thank you!! Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now