Camera Scrolling Problem

Blitz3D Forums/Blitz3D Programming/Camera Scrolling Problem

asdfasdf(Posted 2006) [#1]
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:




Stevie G(Posted 2006) [#2]
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


asdfasdf(Posted 2006) [#3]
OK Thank you that works.