View Single Post
  #17  
Old 11-28-2007, 10:36 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
I tried those time values and they seem to work fine. Here is the script I used:
Code:
import viz
viz.go()

ball = viz.add('ball.wrl',pos=(0,1,5))

def WriteFlag():
	global startTime
	now = viz.tick()
	print now - startTime
	startTime = now
	
movetime = [.05, .25, .5, 1, 2]
for time in movetime:
	MoveRoom = vizact.sequence(vizact.move(0,0,(0.12/time),time), vizact.move(0,0,(-0.12/time),time), int(30/time))
	ball.addAction(MoveRoom)
	ball.addAction(vizact.call( WriteFlag ))

startTime = viz.tick()
And here is the output I got:
Code:
60.0330525563
60.032436376
60.032417561
60.0325621751
60.0324703632
I also manually timed it with a clock and it was correct.

Is your framerate very low?
Reply With Quote