GManB Posted May 22, 2020 Share Posted May 22, 2020 I've recently built a bench swing and am writing the script to create the swinging motion. Here's a Gyazo gif of the swing and motion: https://gyazo.com/b46222dce20dab467a61015ace529543 Here is the high-level description of my swinging motion script: set greatest angle in degrees from vertical (e.g., 30) set a step in degrees (e.g., .2) in state_entry in default compute values for three lists, pos, rot, and sleepOrNot for a full period (bottom, forward-top, bottom, backward-top, bottom) I use sleep at varying intervals to change the speed appropriately. when executing the motion I iterate through the lists and used the below at each step, throwing in a sleep as appropriate. llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_POS_LOCAL,llList2Vector(posList,stepIndex), PRIM_ROT_LOCAL,llList2Rot(rotList,stepIndex)]); The motion looks ok but isn't as smooth as I would like it. And, when there is lots going on in the sim the motion can get even choppier. Is there another way to create smooth motion in SL? I have investigated llTargetOmega and llSetKeyFrameMotion. I couldn't get either to work well. Thanks in advance! G Link to comment Share on other sites More sharing options...
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