WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-01-2006, 02:15 PM
Jerry Jerry is offline
Member
 
Join Date: Jun 2004
Posts: 105
Translate bug?

When using the translate command if the final argument is RELATIVE_LOCAL
or ABSOLUTE_LOCAL the motion should be referenced to the object's local
coordinate system, but the following code shows that to be true
for RELATIVE_LOCAL but not ABSOLUTE_LOCAL. Press the '1' key to
rotate the arrow in various directions and then the '2' or '3' key to
translate in absolute or relative modes. The arrow supposed move in
the direction it is pointing in both cases, but it doesn't for
absolute. Is this a Viz bug or am I missing something?

Sorry I forgot how to embed code properly.

from viz import *
go()
obs = add('arrow.wrl')
translate(HEAD_POS,0,0,-15)

def onkeydown(key):
if key == '3':
obs.translate(0,-1,0,RELATIVE_LOCAL)
if key == '2':
obs.translate(0,-1,0,ABSOLUTE_LOCAL)
if key == '1':
obs.translate(0,0,0)
obs.rotate(0,0,1,90,RELATIVE)

viz.callback(viz.KEYDOWN_EVENT,onkeydown)
Reply With Quote
 


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


All times are GMT -7. The time now is 08:22 AM.


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