How to let a point follow a motion path to move #4143
-
This is a simulation I built, with a soft rope and a wall. I want to simulate the process of swinging the soft rope and then the tail of rope will hit on the wall. However, I do not know how to apply a motion track to the head of the soft rope, I hope that some partners can give me some help. This is my python source code for building this model.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi, for this I suggest to use the component
My example is in xml but can be easily translated in python. Using a spring forcefield allow better performance in term of convergence of the Lagrangian constraint solving. But the tradeoff is that the rope base will not be exactly at the point defined by the 'MotionNode' and will not follow exactly the orientation. If you want more rigidity, you should use langrangian based constraint to fix the base (see |
Beta Was this translation helpful? Give feedback.
Hi, for this I suggest to use the component
LinearMovementConstraint
. It is a projective constraint forcing the value of the position of a point following a parametric linear motion. Thank's to that you can enforce the position of a point inside of a isolated node and use it to move the base of your rope by linking its base to this point with aRestShapeSpringsForceField
. e.g. :