alberto_redo
01-21-2011, 12:28 PM
Hi everyone, I have a problem, I have drawn several points and some are connected with lines and I put an arrow to indicate the direction, I tried to put the arrow with the lookat method, I put on setPosition the coordinates of the origin and I changed the angle of the Y-axis at 90 degrees but can not get fit. Can anyone help?
Copy of the code here:
viz.startlayer(viz.LINES)
viz.vertexcolor(viz.RED)
viz.vertex(xAnterior,yAnterior,zAnterior) #point of origin
viz.vertex(x,y,z) #destination
linea = viz.endlayer()
flecha = viz.add('arrow.wrl')
flecha.setPosition(xAnterior,yAnterior,zAnterior) #point of origin
flecha.lookat([x,y,z]) #destination
flecha.color(1,0,0)
flecha.setEuler(0,90,0)
flecha.parent(linea)
Thanks
Copy of the code here:
viz.startlayer(viz.LINES)
viz.vertexcolor(viz.RED)
viz.vertex(xAnterior,yAnterior,zAnterior) #point of origin
viz.vertex(x,y,z) #destination
linea = viz.endlayer()
flecha = viz.add('arrow.wrl')
flecha.setPosition(xAnterior,yAnterior,zAnterior) #point of origin
flecha.lookat([x,y,z]) #destination
flecha.color(1,0,0)
flecha.setEuler(0,90,0)
flecha.parent(linea)
Thanks