When I use the coppeliaSim I am trying to use function sim.getPositionOnPath() to get the position information about the control Point but i didn't understan "-ctrlPtIndex-1 " mean?
Lua parameters
pathHandle: handle of the path object relativeDistance: a value between 0 and 1, where 0 is the beginning
of the path, and 1 the end of the path.
Make sure you selected the appropriate path length calculation method.
See also sim.getPathLength. In order to retrieve the position that lies
exactly on a specific path control point, specify following for
relativeDistance: -ctrlPtIndex-1 (the value will be rounded appropriately).
you have two methods of getting the coordinates of a point on the path:
method 1: sim.getPositionOnPath(pathHandle,L), where L is a value between 0 and 1 (0 is at the beginning of the path, 1 is at the end of the path. 0.5 is in the middle of the path, etc.)
method 2: sim.getPositionOnPath(pathHandle,V), with V=-zeroBasedCtrlPointIndex-1 (zeroBasedCtrlPointIndex=0: we are at the beginning of the path (or on the first control point), zeroBasedCtrlPointIndex=1: we are at the second control point of the path, zeroBasedCtrlPointIndex=2: we are at the third control point of the path, etc.)
I want to know how can I change the position und orientation of the control point on the path? I want to parameterize the position and orientation of the control point and make a UI to adjust the value of it but I didn't find the function.