Hi all,
A fairly simple issue, but one that has been persistent regardless; I have a linear-fog object that I attach to the camera like this:
colz=base.getBackgroundColor()
linfog = Fog("fogNode")
linfog.setColor(colz.x, colz.y, colz.z)
linfog.setLinearRange(0, 300)
fogNp=camera.attachNewNode(linfog)
fogNp.setName("linearFogMain")
self.mainFog=fogNp
I’m testing changing the fog colour in a task this way:
def fogTaskTest(self,task):
self.mainFog.node().setColor(random.uniform(0,1),random.uniform(0,1),random.uniform(0,1))
print(self.mainFog.node().getColor())
return task.cont
Now, while the values being printed out indicate that the fog is changing colour, the actual colour of the fog on the screen stays the same, or changes once before remaining the same. Is there more to changing the colour of a fog after it has been created, say within a task?
Thanks in advance.