Betty Bishop Posted July 30, 2011 Share Posted July 30, 2011 I am making a clock and want to rotate a cylinder using llTargetOmega to display the seconds. Does anyone know offhand what combination of rate and gain I can use so one revolution = 60 seconds? Link to comment Share on other sites More sharing options...
Cerise Sorbet Posted July 30, 2011 Share Posted July 30, 2011 Hi, the "radians per second" in the llTargetOmega specification looks promising for a clock, but in reality that number is more like a limit. The viewer does not really try at all to maintain this rate, it is happy to slow it down when it has other work to do, and that happens often. You will get much better results with the conventional rotation nudge on a timer. Link to comment Share on other sites More sharing options...
Erwin Solo Posted July 30, 2011 Share Posted July 30, 2011 Have you thought about moving the hand in descrete steps--say every five seconds? That would be cool. Link to comment Share on other sites More sharing options...
Rolig Loon Posted July 30, 2011 Share Posted July 30, 2011 llTargetOmega is a client-side effect, so each person potentially sees a different thing on his/her own viewer, depending on how continuously the effect is updated by their graphics card. The only way to make a clock's hands keep reliable time is to move them with llSetLocalRot or llSetLinkPrimitiveParamsFast . Even then, it's smart to resync the rotation with llGetUnixTime often, because the sim's servers, too, can hiccup and lose time. Link to comment Share on other sites More sharing options...
Void Singer Posted July 30, 2011 Share Posted July 30, 2011 as others have pointed out, it's not good for accuracy, but if it's just for effect (PI / 30) should be about right if the axis is a unit vector (which I imagine it is).... Link to comment Share on other sites More sharing options...
Betty Bishop Posted July 30, 2011 Author Share Posted July 30, 2011 I know that the TargetOmega effect is viewerside and variable. I spent significant trial and error the other day to arrive at -.066655, PI_BY_TWO for close to 60 sec. but that is 65 today. Viewer slowdowns notwithstanding, I was hoping for someone with more math skills than I to point out the exact rate and gain. At least I could take comfort in knowing the script was accurate if not the end result. Link to comment Share on other sites More sharing options...
Void Singer Posted July 30, 2011 Share Posted July 30, 2011 gain should match rate... gain is how many rad/sec it speeds up to the limit of rate. you can maintain mostly smooth rotation and correct for slowdowns by every so often stopping omega, changing the physical rotation and restarting omega... it'll rotate smoothly then jump at the update if it needs to. Link to comment Share on other sites More sharing options...
Betty Bishop Posted July 30, 2011 Author Share Posted July 30, 2011 Thanks for the help. In this case, I can live with close. No one is going to hold a stopwatch up to my clock but me. I hope. 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