WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 05-18-2010, 06:36 AM
Darkmax Darkmax is offline
Member
 
Join Date: Feb 2010
Posts: 108
please use the code tags when your are going to post code, because indentation is very important in python.
And for your navigation problem try this code:

Code:
import viz

viz.go()

viz.add("lab.ive")

myView = viz.MainView

TURN = 25
SPEED = 0.1
def moveView():
	if viz.iskeydown('a'):
		myView.move (0,0,SPEED)

	if viz.iskeydown('z'):
		myView.move (0,0,-SPEED)
	
	if viz.iskeydown(viz.KEY_RIGHT):
		myView.rotate(0,1,0,TURN*viz.elapsed(),viz.BODY_ORI, viz.REL_PARENT)

	if viz.iskeydown(viz.KEY_LEFT):
		myView.rotate(0,1,0,-TURN*viz.elapsed(),viz.BODY_ORI,viz.REL_PARENT)

vizact.ontimer(0,moveView)
Reply With Quote
 

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
Problems creating a mirror Josh Vizard 2 01-28-2010 12:21 PM
Problems loading WRL file DrunkenBrit Vizard 2 01-29-2009 12:58 AM
2 problems with our HMD Vbents Precision Position Tracker (PPT) 1 07-26-2006 07:55 PM
Viz PPT 1 problems Adam Precision Position Tracker (PPT) 3 08-30-2005 10:51 AM
Problems with lighting in 2.0 murm Vizard 6 04-21-2004 09:59 AM


All times are GMT -7. The time now is 01:28 AM.


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