WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 06-30-2005, 02:17 PM
Johannes Johannes is offline
Member
 
Join Date: Jan 2005
Posts: 143
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
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


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


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