Hello, this is my first time asking for help here. Please look at pic related regarding my issue.
I think it is self explanatory.
Basically I am using a spotlight and getting weird artifacts for some reason.
The code I used is this:
self.slight = globs.gPlayerObj.node.attachNewNode(Spotlight(“slight”))
self.slight.setColor(VBase4(1,1,1,1))
self.slight.node().setLens(PerspectiveLens())
self.slight.node().showFrustum()
self.slight.setPos(10,10,30)
self.slight.node().setShadowCaster(True)
self.slight.node().getLens().setNearFar(20, 100)
# self.slight.node().getLens().setFilmSize(200)
self.slight.node().getLens().setFov(40)
self.slight.node().setScene(self.render)
self.slight.lookAt(globs.gPlayerObj.node)
self.render.setLight(self.slight)
Any help on this would be appreciated.
I also do self.render.setShaderAuto() later down in the script. I am not sure what I am doing wrong here. The spotlight moves with the character.