Yalc Shichiroji Posted December 30, 2013 Share Posted December 30, 2013 Ok, here's my issue. I have an oblong shield that once of my characters uses. The idea I have for the shield is that when not in use it is worn along the length of the arm, from wrist to shoulder, and when in use it swings around 90 degrees so that it lays across the arm like a normal carried shield would. My question is would this be possible to achieve or would the rotation script not function properly when attached to an avatar rather than being in world? Link to comment Share on other sites More sharing options...
Dora Gustafson Posted December 31, 2013 Share Posted December 31, 2013 It would not work to rotate by script But you could have two shields attached, one in each position, with only one of them visible at a time All you have to do is toggle alpha from 0% to 100% for one shield and do the opposite on the other shield :smileysurprised::smileyvery-happy: Link to comment Share on other sites More sharing options...
Innula Zenovka Posted December 31, 2013 Share Posted December 31, 2013 Assuming you want to rotate the whole apparatus through 90°, it's pretty straightforward. Take a look at the chart in the wiki article on Rotation. Something like this should do it: rotation r90;default{ state_entry() { r90 = llEuler2Rot(<90.0,0.0,0.0>*DEG_TO_RAD); } touch_start(integer total_number) { llSetRot(r90*llGetLocalRot()); r90=ZERO_ROTATION/r90; //invert the rotation }} Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now