View Single Post
  #2  
Old 10-25-2006, 09:31 AM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
setHardness is a method of VizPhysicsShape, not of VizNode/VizChild. Check the example again. In addition, the case of the letters in the method mater.

Code:
ball = viz.add('ball.wrl')
shape = ball.collideBox()
shape.setHardness(.5)
As we see here, setHardness is called on the object that returns from the collideBox() function. This is because you can have multiple collide shapes assosated with one node, such as the ball.

Check out this code to see multiple collide shapes:

Code:
box = viz.add('box.wrl')
box.collideBox()

ball = box.add('ball.wrl')
ball.scale(2,2,2)
ball.translate(0.5,-0.5,0)
box.collideSphere(pos=(0.5,-0.5,0))
__________________
Paul Elliott
WorldViz LLC
Reply With Quote