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
  #9  
Old 06-07-2011, 05:02 AM
Saz Saz is offline
Member
 
Join Date: Nov 2008
Posts: 36
Hi Jeff,

Further to my last post I've done a bit of experimenting with the code and the problem appears with this part of the coding that makes the road infinite

Code:
def addRoadr():
	
	global roadr_position, roadl_position
	
	viewpointr_pos = viz.MainView.getPosition()
	rightView.setPosition(viewpointr_pos)
	#check to see how close the viewpoint is to the end of the road
	if roadr_position - viewpointr_pos[2] < 50:
		
		
		
		#add 50 meters of road
		for i in range(1,50):
			#quadrcopy = quadr.copy(scene=2)#makes left hand quad appear in both windows
			quadrcopy = quadr.copy()#makes the 2 quads appear in each window
			quadrcopy.setPosition([0.75,0,roadr_position])
			quadrcopy.setEuler(0,90,0)
			roadr_position +=1
			
	viz.MainView.move(0,0,MOVE_SPEEDr,viz.HEAD_ORI)

addRoadr()
#call a timer every frame to check if road needs to be added
vizact.ontimer(0, addRoadr)
As well as repeating the road it also seems to copy the quad into both of the scenes, so I'm guessing that it's the quadr.copy command that's the issue, any ideas on how I can still keep the infinite road but just have the quad in one scene?
Thanks
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
rotate around moving axis moneim230 Vizard 1 07-14-2010 09:04 AM
Stop moving after few seconds?? Chrissy2009 Vizard 8 05-10-2009 02:47 PM
Moving avatars lips with sound dan12345 Vizard 5 01-29-2008 07:32 PM
Moving view with object Xliben Vizard 2 07-25-2005 05:36 PM
moving viewpoint vs. translating Head_pos bailenson Vizard 5 02-01-2005 01:51 PM


All times are GMT -7. The time now is 10:51 PM.


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