View Single Post
  #4  
Old 06-08-2009, 12:02 PM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
You can get the forward vectors of the parts and fittings from their transform matrices.
Code:
partForwardVector = part.getMatrix().getForward()
The physics system does not support dynamic forces, like gravity, on collideMesh shapes. Complex shapes need to be made up of multiple simple shapes like boxes and spheres.

What you'll want to do is name some sub-nodes of your hollow cylinder and call collideBox(node="subobject1") on them. The docs have an example on this with the table.wrl object:

Code:
table = viz.add('table.wrl',pos=[0,3,6.5],euler=[90,45,90]) # Add table
table.collideBox(node='Leg1') # Define 
table.collideBox(node='Leg2') # collision
table.collideBox(node='Leg3') # area
table.collideBox(node='Leg4') # for
table.collideBox(node='Top')  # parts
__________________
Paul Elliott
WorldViz LLC
Reply With Quote