Camera View

from pandac.PandaModules import Vec4
from pandac.PandaModules import LineSegs
import direct.directbase.DirectStart
from panda3d.core import GeomNode

base.camera.setPos( 0, 0, 90)
base.camera.lookAt( 0, 0, 0 )
xP=-10
xD=10
red=0
g=0
b=1
min=-60
max=60
xP=min
xD=max
S=5
for m in range(min,max):
	
		segs = LineSegs( )
		segs.setThickness( 0.0001 )
		segs.setColor(red,g,b)
		if m==min:	
			segs.setColor(1,0,0)
		#if m==0:
			#segs.setColor(0,1,0)
		segs.moveTo(xP,m,-S/2 )
		segs.drawTo( xD,m,-S/2 )
		f=segs.create( )
		render.attachNewNode( f )
for m in range(min,max):
	
		segs = LineSegs( )
		segs.setThickness( 0.0001 )
		segs.setColor(red,g,b)
		if m==min:	
			segs.setColor(1,0,0)
		#if m==0:
			#segs.setColor(0,1,0)
		segs.moveTo(m,xP,-S/2)
		segs.drawTo( m,xD,-S/2 )
		f=segs.create( )
		render.attachNewNode( f )

base.run()
		

Any idea why the program isn’t outputing a view from the top down when all values except z are 0 for camera postion. The program outputs a view at an angle…

You missed to call

base.disable_mouse()

Before you try to reposition the camera.

Placing the camera while having P3D’s default camera controls active doesn’t work directly. AFAIK you’d need to use the trackball driver’s node to position the camera if you plan to keep the default controls active.
Though it’s common to disable the default controls and write your own.

Ah, thanks!