Vizard 7 » Command Index » Vizard objects » node3d » <node3d>.collideMesh
7.6

<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

<node3d>.collideBox
<node3d>.collideCapsule
<node3d>.collideCopy
<node3d>.collideNone
<node3d>.collidePlane
<node3d>.collideSphere