TutorielSimplemcjElasticSimDangler
Demonstration:
at frame 0
playrange : frames 0 to 60 included
create sphere 10cm diam - we will call it the leadBall
Ytranslate ball = 170cm
use mcjCycleFilter to apply a triangular animation curve sphere's xTranslate -100 to 100 phase = 90
create a 100cm cylinder and another sphere, parent them to the lead-ball
we call this sphere the dangleBall
create a dForm that can pull the dangleBall and the end of the cylinder/rope
i selected the leadBall
i ran the script
my lead ball moves sideways ( x axis )
i want the sim to be suspended 100cm below the leadBall and to swing sideways
this explains why xPos, yPos, zPos = [ 0, -100, 0 ]
zmin,zmax = 0 because i want the ball to stay in the XY plane
ymin,ymax = -100 because i dont want a vertical motion
initially vMax was 10, and stiff was 10
the only force is gravity so we have yAcc = -980, xAcc = 0 and zAcc = 0
note that each time you change one of those parameters, you need to click the "Modify" button to transfer those new parameters to the simulation device
then i pressed the "Run Simulation" button
i closed the script
since the sim node didn't swing much
i ran the script again and increased vMax to 100 ( maximum speed )
and i decreased the stiffness from 10 to 1
i clicked the "Modify button" to transfer the new settings to the simulator
i pressed the "Run Simulation" button
i exited the script
i parented the dForm handle to the "sim" node and zeroed it's translations and cleared any animation of the dForm handle
so now the dForm handle follows the Sim node
and the dForm pulls and pushes the dangler ball and its rope-end