Camera Scrolling Problem

Blitz3D Forums/Blitz3D Programming/Camera Scrolling Problem

This is probably an easy problem but I can't figure it out. You are supposed to look down directly at the plane and then be able to move around by using the direction keys. Thanks.
Here is the code:

plane = CreatePlane()
DebugLog "Created Plane: " + plane
tex = LoadTexture("Data\Menus\Cursor.png")
DebugLog "Loaded Texture: " + tex
cam = CreatePivot()

FreeEntity camera
camera = CreateCamera(cam)

PositionEntity camera,EntityX(cam),EntityY(cam),EntityZ(cam)
EntityTexture plane,tex

MoveEntity cam,0,0,5
MoveEntity camera,0,0,5
PointEntity camera,plane

FreeTexture tex
tex = 0

While Not exitGame = 1

TurnEntity camera,MouseYSpeed(),0,0
TurnEntity camera,0,-MouseXSpeed(),0
If KeyHit(208) Then 
	MoveEntity cam,0,0,-1
ElseIf KeyHit(200) Then 
	MoveEntity cam,0,0,1
ElseIf KeyHit(203) Then
	MoveEntity cam,-1,0,0
ElseIf KeyHit(205) Then 
	MoveEntity cam,1,0,0
EndIf

If KeyHit(1) Then exitGame = 1

RenderWorld
Flip

Wend


Like this ? ...

Graphics3D 640,480,16,1

plane = CreatePlane()
DebugLog "Created Plane: " + plane
tex = CreateTexture( 16,16 ) 
SetBuffer TextureBuffer( tex )
For y = 0 To 15
	For x = 0 To 15
		Color Rand(128)+127, Rand(128)+127, Rand(128)+127
		Plot x, y
	Next
Next
SetBuffer BackBuffer()
EntityTexture plane,tex
FreeTexture tex

cam = CreatePivot()
camera = CreateCamera(cam)
PositionEntity cam, 0,5,-10
PointEntity camera,plane

While Not exitGame = 1

	TurnEntity cam , 0 , -MouseXSpeed() , 0
	TurnEntity camera , MouseYSpeed(), 0, 0
	MoveMouse 320,240
	MoveEntity cam , KeyDown(205) - KeyDown( 203 ) , 0 , KeyDown(200) - KeyDown( 208 ) 
	
	If KeyHit(1) Then exitGame = 1
	
	RenderWorld
	Flip

Wend


Stevie

OK Thank you that works.