I have a database in which I drive with the mouse, and an ambient light plus a point light, see code:
# Add an ambient light
alight = AmbientLight('alight')
alight.setColor(Vec4(0.7, 0.7, 0.7, 0))
alnp = render.attachNewNode(alight)
#self.world.setLight(alnp)
#render.setLight(alnp)
# add a point light
light2 = PointLight('pointlight')
light2.setAttenuation(Point3(0,0,0))
plnp2 = render.attachNewNode(light2)
#plnp2.setPos(0,0,0)
plnp2.setPos(-24,-1548,30)
self.world.setLight(plnp2)
#render.setLight(plnp2)
The ambient light gives no problem, but inclusion of the point light results in flashing: the light appears to switch on and off depending on my mouse movements. So if I turn the heading of the camera then the point light illuminates some objects in the database while they are not illuminated anymore when I turn the heading just a little bit further. This results in flashing on and off of objects in the database.
What could be the reason for this ?