View Single Post
  #4  
Old 12-18-2006, 01:13 PM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
I think I did no make myself clear.

For collideMesh() to work, the model must be a child of viz.WORLD. If you import all your objects in one file, the objects will be children of the larger model/file object. So you would have to break the objects out of the model and set their parents to viz.WORLD. Here is some code showing what I am talking about.

bigModel = viz.add('allmyobjects.wrl')
smallThing = bigModel.getChild('mySubObjectName')
smallThing.parent(viz.WORLD)
smallThing.collideMesh()

You would have to do this for each model you want to be grabable. Allternativly, you could use the code in my last message and have each object be a seperate file.
__________________
Paul Elliott
WorldViz LLC
Reply With Quote