![]() |
|
#3
|
|||
|
|||
Hi,
Did you get the email (about a week ago)? No problem if you do not get to it right now, just want to make sure you got it. Right now I have the hopefully short question about vectors and translate, from time to time I get the following error using object.translate commands and vectors: tempVector1=glider.initialVelocity*timeElapsed print 'tempVector1',tempVector1 tempVector=vizmat.Vector(objects.get(viz.POSITION) +tempVector1) print 'tempVector',tempVector objects.translate(tempVector) tempVector1 [0.000000, 0.000000, 0.895308] tempVector [0.000000, 0.997500, 0.853729] Traceback (most recent call last): File "050632_GoodXX.py", line 1942, in ontimer moveGliderEven(gliderObj) File "050632_GoodXX.py", line 1332, in moveGliderEven for objects in greyBallBasket: AttributeError: Vector instance has no attribute '__float__' Had a similar problem yesterday, but worked around it.. If I have a positionVector ballPositionVector and want to access the values (x,y,z). so I use ballPositionVector[0],ballPositionVector[1],ballPositionVector [2] and want to generate a new vector out of these I get the error below. Why that? print self.ballPositionVector,self.ballPositionVector[0] self.x=self.ballPositionVector[0] print 'self.x',self.x self.y=self.ballPositionVector[1] self.z=self.ballPositionVector[2] self.actualPos=viz.Vector(self.x,self.y,self.z)#ac tual Position File "050629_GoodXXSteve.py", line 316, in initializeValues self.actualPos=viz.Vector(self.x,self.y,self.z)#ac tual Position File "C:\Program Files\Vizard25\vizmat.py", line 379, in __init__ elif type(x) == type([]): AttributeError: Vector instance has no attribute '__float__' Exception exceptions.AttributeError: "Ball instance has no attribute 'velocityXArrow'" in <bound method Ball.__del__ of <__main__.Ball instance at 0x026E48A0>> ignored |
|
|