Open topic with navigation
<node3d>.collideSphere
Creates a VizPhysicsShape that collides as if there was a bounding sphere around the node
<node3d>.collideSphere( |
|
radius = -1 |
node = '' |
) |
|
radius = -1
Radius of sphere
node = ''
Subnode to use for auto-calculating bounding sphere.
Remarks
Creates a VizPhysicsShape that collides as if there was a bounding sphere around the node. With default arguments, the bounding sphere is a close fitting as possible while preserving the sphere shape. You can encode the dimensions of the sphere if you fill in the radius parameter. 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()
ball = viz.add('ball.wrl')
ballCollideShape = ball.collideSphere()
See also