PDA

View Full Version : how to move front and back


nasr
05-08-2009, 11:49 PM
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.
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..