WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Checking Collision with a subnode (https://forum.worldviz.com/showthread.php?t=3040)

Chapre 10-21-2010 03:10 AM

Checking Collision with a subnode
 
Hello! I'm working on collision between 2 objects, When my main object collide with a second object, I can easily get the the second object ID; my main problem now is how will I check if my main object collided with a child (subnode) of the second object?

Jeff 10-21-2010 10:57 AM

There is no command to check for collisions with a sub-part of an object. You can do this using the method described in the following article:
http://kb.worldviz.com/articles/350

masaki 10-21-2010 11:13 AM

You can also try re-parenting the child to viz.WORLD, apply a collision shape to it, and then detect collisions.

e.g.
model = viz.add( 'myModel.ive')
child = model.getChild( 'subnode-GEODE' )
child.parent( viz.WORLD )
child.collideBox()

Masaki

Chapre 10-25-2010 06:25 AM

Thanks very helpfull!


All times are GMT -7. The time now is 10:42 AM.

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