Vizard 7 » Command Index » Vizard objects » node3d » <node3d>.setAutoScale
7.7

<node3d>.setAutoScale

Set the automatic scaling mode

<node3d>.setAutoScale(  
mode  
)  
mode
Can be any True/False value or viz.TOGGLE to toggle the current state

Remarks

When automatic scaling is enabled, the node will maintain a constant size on screen, regardless of the distance to the camera. In this case, the scaling units will be in pixels, rather than world units (e.g., meters).

This is commonly used to place billboarded text and icons in the world at a fixed size.

Return Value

None

Example

import viz
viz.go()

viz.add('piazza.osgb')

text = viz.addText('Hello World',pos=(0,2,4),fontSize=30)
text.alignment(viz.ALIGN_CENTER)
text.setBackdrop(viz.BACKDROP_OUTLINE)
text.billboard(viz.BILLBOARD_VIEW)
text.setAutoScale(True)

See also

<node3d>.getAutoScale
<node3d>.billboard
<viz>.addText
<viz>.addTexQuad