How to make two quadricopters follow two different paths
Posted: 12 Sep 2020, 13:14
I am trying to make two quadricopters follow two different paths using the following code in Quadricopter_target file
for the first quadricopter and the same code with 'Path2' instead of 'Path1' for the second one.
However, only the first quadricopter follows his path while the second one just stay on site. I guess that it is a consecuence of the #0 suffix that appears in the name of the second quadricopter. I tried to modify the code of the child script while renaming the quadricopter#0 files but, despite of the quadricopter#0 starts moving, it doesn't follow its path.
Thanks in advance
Code: Select all
target=sim.getObjectAssociatedWithScript(sim.handle_self)
path=sim.getObjectHandle('Path1')
for i=1, 1 do
sim.followPath(target,path,1,0,0.2,0.5)
end
However, only the first quadricopter follows his path while the second one just stay on site. I guess that it is a consecuence of the #0 suffix that appears in the name of the second quadricopter. I tried to modify the code of the child script while renaming the quadricopter#0 files but, despite of the quadricopter#0 starts moving, it doesn't follow its path.
Thanks in advance