<node3d>.billboard

This will set the billboarding mode of the object

 

<node3d>.billboard(
    mode = viz.BILLBOARD_VIEW    

)

 

mode = viz.BILLBOARD_VIEW

Can be one of the following values:

Billboard modes

viz.OFF

Turn billboarding off.

viz.BILLBOARD_VIEW

The node will automatically be rotated to match the viewpoint rotation.

viz.BILLBOARD_YAXIS

The node will automatically be rotated to face the viewer along the y-axis.

viz.BILLBOARD_VIEW_POS

The node will automatically be rotated to face the viewpoint position.


Remarks

viz.BILLBOARD_VIEW and viz.BILLBOARD_VIEW_POS are useful for having text labels that you always want to be facing the viewer. viz.BILLBOARD_YAXIS is useful when you have a tree texture that you want to rotate with the viewer.

Return Value

None

Example

ball = viz.add('ball.wrl')
ball.billboard()

quad = viz.addTexQuad()
tree = viz.addTexture('tree.jpg')
quad.texture(tree)
quad.billboard(viz.BILLBOARD_YAXIS)

See also

<node3d>.getBillboard
<node3d>.setAutoScale
<viz>.addText
<viz>.addTexQuad