My scene consists of 12 cards flat on a table and when you click one, it flips over and grows to almost full screen. Then the card fades out while a frame on 2drender fades in, and the frame contains a scene shot by another camera.
My problem is that my collision ray (which comes from the original camera to the mouse) that is used to click the cards is showing up in the frame on 2drender. I can see the line and it looks ugly =(
Any ideas to get rid of the line?
Here’s my code:
def createViewport(self): # Create the left offscreen buffer self.leftBuffer = base.win.makeTextureBuffer('left', 512, 512) self.leftBuffer.setClearColor(VBase4(0, 0, 0, 0)) base.makeCamera(self.leftBuffer) # Create a card to view the buffer on render2d self.leftCard = CardMaker('scene') self.leftCard.setFrame(-1, 1, -.75, .75) self.leftCardNP = aspect2d.attachNewNode(self.leftCard.generate()) self.leftCardNP.setTexture(self.leftBuffer.getTexture()) # make the frame camera look at the scene base.camList.setPos(0, 0, 10) base.camList.lookAt(0,1,10) #self.hideViewport() # end createViewport # track the mouse and set the collision ray from the camera to the mouse def trackMouse(self, task): if base.mouseWatcherNode.hasMouse(): self.mousePos = base.mouseWatcherNode.getMouse() self.pickerRay.setFromLens(base.camNode, self.mousePos.getX(), self.mousePos.getY() ) return Task.cont #end trackMouse