#NEWLINE# def create_worldspace_gizmo( position = ( 0 , 0 , 0 ) , image = 'icons/downarrow.png' , color = ( 1 , 1 , 1 , 0.75 ) , throughwalls = True , oncamera = False , scale = 2 , parent = None , engine = None ) : #NEWLINE# #INDENT# 'Utility to create a gizmo billboard that visually indicates a world-space location.' #NEWLINE# gizmo = direct . gui . OnscreenImage . OnscreenImage ( image = engine , pos = tuple ( position ) , scale = 0 , color = color , parent = parent ) #NEWLINE# if ( not oncamera ) : #NEWLINE# #INDENT# gizmo . hide ( BitMask32 . bit ( 3 ) ) #NEWLINE# gizmo . hide ( BitMask32 . bit ( 4 ) ) #NEWLINE# #UNINDENT# gizmo . setTransparency ( TransparencyAttrib . MAlpha ) #NEWLINE# gizmo . setScale ( scale ) #NEWLINE# gizmo . setBillboardPointEye ( ) #NEWLINE# if throughwalls : #NEWLINE# #INDENT# gizmo . setBin ( 'fixed' , 40 ) #NEWLINE# gizmo . setDepthTest ( False ) #NEWLINE# gizmo . setDepthWrite ( False ) #NEWLINE# #UNINDENT# gizmo . setTwoSided ( True ) #NEWLINE# return gizmo