WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-08-2009, 11:49 PM
nasr nasr is offline
Member
 
Join Date: Apr 2009
Posts: 27
how to move front and back

vizact.whilekeydown(viz.KEY_UP,hand.translate,0,vi zact.elapsed(1),0,viz.RELATIVE_WORLD)
vizact.whilekeydown(viz.KEY_DOWN,hand.translate,0, vizact.elapsed(-1),0,viz.RELATIVE_WORLD)
vizact.whilekeydown(viz.KEY_RIGHT,hand.translate,v izact.elapsed(1),0,0,viz.RELATIVE_WORLD)
vizact.whilekeydown(viz.KEY_LEFT,hand.translate,vi zact.elapsed(-1),0,0,viz.RELATIVE_WORLD)

using the above lines of code i am able to move the marker object up, down, left and right. i want to move it in front and back directions. what are the key attributes for this?
Reply With Quote
  #2  
Old 05-10-2009, 03:31 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You have to specify that the object's z value is changing. This uses the return and right shift key to do that.
Code:
vizact.whilekeydown(viz.KEY_RETURN,hand.translate,0,0,vizact.elapsed(1),viz.RELATIVE_WORLD)
vizact.whilekeydown(viz.KEY_SHIFT_R,hand.translate,0,0,vizact.elapsed(-1),viz.RELATIVE_WORLD)
Reply With Quote
  #3  
Old 05-11-2009, 02:00 AM
nasr nasr is offline
Member
 
Join Date: Apr 2009
Posts: 27
jeff thanks for you reply...

now im moving, rotating the objects using the keyboard keys but if the number of objects in the application are increased it is becoming difficult to assign the keys for each action. is it not possible to rotate the object using mouse pointer?
thanks again..
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


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


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