Lolita Erin Posted March 6, 2015 Share Posted March 6, 2015 Hello i have manage to make a prim move side to side give the idea that is vibration but is not realistic, is not fast engouth, becuse the timer can go lower is any way i can make a vibration script realistic and not laggie? thank you Link to comment Share on other sites More sharing options...
Nova Convair Posted March 6, 2015 Share Posted March 6, 2015 Thats not only a matter of scripting. The server "tick" is 45 frames. That means in theory your script can process 45 events per second. Will the server give it enough cpu time to do that? Thats unprobable, even on an empty sim. But you can make the prim change it's position pretty fast. But will the server update your viewer every time the position changes? Nope. So 15 moves per seconds are possible if the server has enough time for your script and the avatars around. (by my observations) But of course you can try what goes for you and what not. For the move itself you need to use a script function without a delay. Only llSetLinkPrimitiveParamsFast qualifies for that. It will change the prim position immediately. You just will not see it immediately - you will see it when the server has done the updates, send them to you and your computer has drawn a new frame. If you have usecd llSetPos that's a big fail. It's way too slow for that. Link to comment Share on other sites More sharing options...
Lolita Erin Posted March 6, 2015 Author Share Posted March 6, 2015 thanks for you help is any script available to see a correct way to use the timer and the llSetLinkPrimitiveParamsFast? thanks Link to comment Share on other sites More sharing options...
Xiija Posted March 7, 2015 Share Posted March 7, 2015 this is an example of SLPPF and a fast timer... script is made for an unlinked object .. rez a box and drop it in, and see if it is fast enuff? the movement is very small, mebbe that will help? integer k;integer flip = 1;list params;vector pos;integer link = 0;default{ state_entry() { params = llGetLinkPrimitiveParams(link, [PRIM_POSITION]); pos = llList2Vector(params,0); } touch_start(integer total_number) { if( k = !k) llSetTimerEvent(0.02); else llSetTimerEvent(0.0); } timer() { llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_POSITION, pos + ( (flip = -flip) * <0.02, 0.0, 0.0> )] ); }} Link to comment Share on other sites More sharing options...
Lolita Erin Posted March 7, 2015 Author Share Posted March 7, 2015 Thank so much this is exacly what i need Link to comment Share on other sites More sharing options...
Lolita Erin Posted March 7, 2015 Author Share Posted March 7, 2015 can this work on a linked prim? it is posible? Link to comment Share on other sites More sharing options...
Lolita Erin Posted March 7, 2015 Author Share Posted March 7, 2015 i try to make this to work on a Root script and try to move the linked prim but it not move... Link to comment Share on other sites More sharing options...
Lolita Erin Posted March 7, 2015 Author Share Posted March 7, 2015 nevermind i think i just got it! thank you Link to comment Share on other sites More sharing options...
Ren Toxx Posted March 7, 2015 Share Posted March 7, 2015 Not really a script suggestion, but perhaps setting the object surface texture during the vibration lapse with a motion-blurred version of the “static” one might increase the realism of the effect. Link to comment Share on other sites More sharing options...
Qie Niangao Posted March 10, 2015 Share Posted March 10, 2015 [...] any way i can make a vibration script realistic and not laggie? [emphasis mine] Moving any object at a vibration-like frequency is inherently laggy. It's bad news for the sim because it's being tasked with updating the position very often, but much, much worse news for viewer network lag. When you get one of these buzzing, turn on Develop / Show Info / Show Updates to Objects (Ctrl+Alt+Shift+U) to see what I mean. That also means the vibration will be subject to interruptions when other stuff competes for bandwidth. Ideally, you'd want to make the vibration something the viewer can do all by itself, without needing to get updates from the sim. Without knowing a lot more about the application, I don't have any great suggestions for finding such a trick, unless maybe you can get away with blinking successive frames of texture animation instead of actually moving the object back and forth. (For example, a much different kind of vibration, that of a speaker cone, is done with lag-free PING_PONG | SCALE texture animation, but that's not the objective here.) 1 Link to comment Share on other sites More sharing options...
Lolita Erin Posted March 10, 2015 Author Share Posted March 10, 2015 Thanks for your comment Qie, and i am aware of the lag, what i did is to turn on the vibration only when the engine door is open when is close i turn it off! i need to learn what you sugest i will google lit 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