XbabylonX Posted June 5, 2015 Share Posted June 5, 2015 Hello,I made a custom hud for myself, but because it contains many small buttons (prims linked with one basic prim), I want the basic prim to rotate 180 in order to hide the small buttons.So far Im using the script I found here http://wiki.secondlife.com/wiki/LlRot2Euler , it works the first time I click so it makes the 180 rotation, but when I want to show the buttons again, it does nothing.Any ideas?Thank you! Link to comment Share on other sites More sharing options...
Xiija Posted June 5, 2015 Share Posted June 5, 2015 a snippet that may help? float amt = 90;default{ state_entry() { } touch_start(integer total_number) { llSetLinkPrimitiveParamsFast(1,[PRIM_ROTATION,llGetLocalRot() * llEuler2Rot(<0,0,(amt*=-1)>*DEG_TO_RAD)]); }} this will rotate a linkset back and forth 90 degrees on the z axis, by changing the amt variable and multiplying by -1 you change the direction. ( for 180 ... it may spin it around?) 2 Link to comment Share on other sites More sharing options...
XbabylonX Posted June 5, 2015 Author Share Posted June 5, 2015 Thank you so much! I was experimenting with so many pieces of scripts, hundreds of line each. This is so simple and straight! Thank you so much! Link to comment Share on other sites More sharing options...
Xiija Posted June 5, 2015 Share Posted June 5, 2015 most welcome you can also invert rotations like so ... rotation Rot;default{ state_entry() { Rot = llEuler2Rot(<0.0 ,0.0, 90.0>*DEG_TO_RAD); } touch_start(integer total_number) { llSetRot(Rot*llGetLocalRot()); Rot=ZERO_ROTATION/Rot; //invert the rotation }} ( this will keep a 180 rotation from spinning ) Link to comment Share on other sites More sharing options...
Anne Zapedzki Posted May 17, 2020 Share Posted May 17, 2020 On 6/5/2015 at 2:55 PM, Xiija said: a snippet that may help? float amt = 90;default{ state_entry() { } touch_start(integer total_number) { llSetLinkPrimitiveParamsFast(1,[PRIM_ROTATION,llGetLocalRot() * llEuler2Rot(<0,0,(amt*=-1)>*DEG_TO_RAD)]); }} this will rotate a linkset back and forth 90 degrees on the z axis, by changing the amt variable and multiplying by -1 you change the direction. ( for 180 ... it may spin it around?) I am trying to do a simple flip hud over, a business card so ppl can see the other side, but these scripts are not working. I have a regular flip prim script but it flips only 90 instead of 180 on the hud, then touching it again, doesnt flip back. But these scripts dont move the prim on hud at all, what am i doing wrong? Link to comment Share on other sites More sharing options...
Xiija Posted May 20, 2020 Share Posted May 20, 2020 (edited) @Kacie Zapedzki this seems to work for me... float amt = 180; default { state_entry() { } touch_start(integer total_number) { llSetLinkPrimitiveParamsFast( LINK_THIS, [ PRIM_ROTATION,llGetLocalRot() * llEuler2Rot( <0, 0, (amt*=-1)> * DEG_TO_RAD) ]); } } Edited May 20, 2020 by Xiija 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