<node3d:light>.position

Sets the position of the light.

 

<node3d:light>.position(
    x    
    y    
    z    
    w = 1    

)

 

x


y


z


w = 1


Remarks

Sets the position of the light relative to its object location.

If w is 0 the position then represents what direction light comes from. To represent the sun try position(0,1,0,0)

Return Value

None

Example

import viz
viz.go()
viz.clearcolor(0.5,0.5,1)

lightNode = viz.addGroup()
viz.disable(viz.LIGHT0)
mylight = viz.addLight(parent=lightNode)
ball = viz.add('white_ball.wrl',parent=lightNode)

mylight.position(0,1,0,1)