How to get the exact position of a shape using regular API?
Posted: 26 Jun 2020, 07:21
Hallo Admin,
I need to get the exact position of a shape using regular API. I did not find an API which does exactly what I need!.
I used sim.getOjectPosition(ShapeHandle,-1). But using this API I got the position of blue line in the below image. Kindly have a look.
But I need the position at intersection of green and red line. How can I know what position difference is there between blue(position got from co-ordinate frame) and red line, so then I can add extra difference to linear.x value manually?
In other words, middle position of intersection of two shapes in the above figure.
Basically blue line is the co-ordinate system of that shape, I am assuming it and also position of that shape relative to world frame!
Or else any suggestion to do it in a better way in coppeliasim?
Never mind for my understanding in co-ordinate system.
Thanks in advance.
I need to get the exact position of a shape using regular API. I did not find an API which does exactly what I need!.
I used sim.getOjectPosition(ShapeHandle,-1). But using this API I got the position of blue line in the below image. Kindly have a look.
But I need the position at intersection of green and red line. How can I know what position difference is there between blue(position got from co-ordinate frame) and red line, so then I can add extra difference to linear.x value manually?
In other words, middle position of intersection of two shapes in the above figure.
Basically blue line is the co-ordinate system of that shape, I am assuming it and also position of that shape relative to world frame!
Or else any suggestion to do it in a better way in coppeliasim?
Never mind for my understanding in co-ordinate system.
Thanks in advance.