View Single Post
  #4  
Old 03-19-2014, 10:19 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
I'd recommend creating a class to update the quad and to store variables from each update. Here is a simple outline of what I am referring to:
Code:
import vizact

class QuadManipulator(object):
	def __init__(self, input):

		# Save input
		self.input = input

		# Initialize variables here
		self.some_int = 0
		self.some_bool = False

		# Call our method every frame
		vizact.ontimer(0, self.myFunction)

	def myFunction(self):

		# Compute some stuff and update quad

		# Update some variables
		self.some_int = 2
		self.some_bool = True

# Create instance of our class
q = QuadManipulator('input')
Reply With Quote