According to your help, I could download ‘Demo.Forces.any’ file from the chapter ‘The mechanical elements: Lesson 5: Forces’.
In the ‘Demo.Forces.any’ file, I could see that how to apply a time-varying size of force to a reference node of an AnySeg as you explained.
AnyForce3D InterpForce = {
// Interpolation function. The interpolated data
// can also be read directly from a text file
AnyFunInterpol force = {
Type = PiecewiseLinear;
T = { 0.0, 0.2, 0.4, 0.6, 0.8, 1.0 };
Data = { {0.0, 1.0, 0.5, 2.0, 2.0, 0.0 }*100 };
};
AnyRefNode &PalmNode = Main.ArmModel.Segs.LowerArm.PalmNode;
AnyVector Fy = force(t);
F = {0,Fy[0],0}; // Force in Newton
};
But as you can see in this code the acting point of the force is fixed to ‘&PalmNode’.
If I want to apply a force to a time-varying relative position of an AnySeg,
then should I use a dummy AnySeg and a kinematic driver between the dummy AnySeg and the original AnySeg that I want to apply force to?