WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   how to move front and back (https://forum.worldviz.com/showthread.php?t=2015)

nasr 05-08-2009 11:49 PM

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?

Jeff 05-10-2009 03:31 PM

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)


nasr 05-11-2009 02:00 AM

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..


All times are GMT -7. The time now is 04:05 PM.

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