Vizard 7 » Command Index » Vizard objects » VizPhysicsShape » <VizPhysicsShape>.getDensity
7.6

<VizPhysicsShape>.getDensity

Gets the density of a physics shape.

<VizPhysicsShape>.getDensity()  

Remarks

Return Value

The density value.

Example

ball = viz.add('ball.wrl')
shape = ball.collideBox()
print(shape.getDensity())

Alternate Method:
print(shape.density)