WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-21-2011, 12:28 PM
alberto_redo alberto_redo is offline
Member
 
Join Date: Oct 2010
Posts: 3
how can i change the orientation of an arrow?

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
Reply With Quote
  #2  
Old 01-25-2011, 12:18 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Try using marker.wrl instead. It is aligned along the +Z axis, so it should work properly with the node.lookat command.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in setting the orientation of bones bharatbhushan Vizard 0 06-30-2009 04:30 AM
Loading OSG models and orientation Joran Vizard 4 06-18-2009 05:43 AM
orientation question whj Vizard 3 01-21-2009 11:22 AM
Randomly and Continuously Change Avatar's Face Texture Karla Vizard 4 08-22-2008 12:14 PM
(beginner) calculating orientation change with eulers astull Vizard 16 02-22-2007 09:45 AM


All times are GMT -7. The time now is 10:44 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC