WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #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
 


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 12:03 PM.


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