WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-09-2008, 04:10 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Can you provide a minimal working sample that reproduces the problem? The following code works for me:
Code:
class Car(viz.VizNode):
	def __init__(self):
		
		model = viz.add('mini.osgx')
		
		viz.VizNode.__init__(self,model.id)


import viz
viz.go()

c = Car()
c.setPosition(0,0,10)
c.setEuler(180,0,0)
c.addAction(vizact.spin(0,1,0,90))
Reply With Quote
  #2  
Old 01-10-2008, 06:49 AM
theuberk theuberk is offline
Member
 
Join Date: Jul 2007
Posts: 44
Alright I figured out the problem. It had to do with getting a child object from the model that was imported as a "car". This was code that was in the constructor that I didn't include in my previous post because I didn't think it was important (oops.):

Code:
self.frontWheels = self.tempCar.getChild( '0' + str(randomCar) + 'tyresBack-OFFSET' )
self.backWheels = self.tempCar.getChild( '0' + str(randomCar) + 'tyresFront-OFFSET' )

this needed to be changed to:

Code:
self.frontWheels = self.getChild( '0' + str(randomCar) + 'tyresBack-OFFSET' )
self.backWheels = self.getChild( '0' + str(randomCar) + 'tyresFront-OFFSET' )
Reply With Quote
  #3  
Old 01-10-2008, 07:01 AM
theuberk theuberk is offline
Member
 
Join Date: Jul 2007
Posts: 44
Sorry I forgot, I also had to change the name of the ID parameter in the constructor. It must have been scope problems with tempcar.id or something..
Reply With Quote
Reply

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
viztask question asimbh Vizard 1 11-20-2007 09:12 AM
Another color question mjabon Vizard 4 07-31-2007 03:04 PM
question about yaw, pitch, roll TunTun Vizard 2 05-23-2007 12:46 PM
to rephrase my question... shai Vizard 2 10-27-2004 10:55 AM
Lots of Question Karthi Vizard 4 02-20-2004 06:42 PM


All times are GMT -7. The time now is 02:00 AM.


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