Open topic with navigation
<node3d>.collideMesh
Creates a VizPhysicsShape that uses the mesh of the node for collisions
<node3d>.collideMesh( |
|
model = None |
node = '' |
) |
|
model = None
node3d object to use for generating collide mesh. If None, uses this node.
node = ''
Subnode to use for generating collide mesh
Remarks
Creates a VizPhysicsShape that uses the mesh of the node for collisions. Currenlty, dynamic physics forces are not supported for collideMesh shapes. You should call <node3d> .disable( viz.DYNAMICS ) on the node if you use collideMesh. It also possible to include keyword arguments for the VizPhysicsShape object's material properties: friction, density, hardness, bounce.
Return Value
VizPhysicsShape object.
Example
viz.phys.enable()
box = viz.add('box.wrl')
box.collideMesh()
box.disable( viz.DYNAMICS )
See also