forward/back speed increases infinatley :/

Blitz3D Forums/Blitz3D Beginners Area/forward/back speed increases infinatley :/

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Graphics3D 800,600


light = CreateLight()
camera = CreateCamera()

cube = LoadMesh("cube1.3ds")
PositionEntity camera,0,0,EntityZ(cube)-600

Global cubez# = 0

While Not KeyHit(1)

	
	cubex = MouseX()
	cubey = MouseY()
	
	If KeyDown(200) = True
		
		cubez# = cubez# + .2
		
	ElseIf KeyDown(208) = True
	
		cubez# = cubez# - .2
		
	Else cubez# = 0
		
	EndIf
	
	PositionEntity cube,0,0,0
	MoveEntity camera,cubex,cubey,cubez#
	
	UpdateWorld
	RenderWorld
	Flip
	
Wend


When I push up key or down key the speed starts of slow and icreases till its warp drive.

cubez = cubez + .2 should move the cam slowly.

In 2d if you did dudex = dudex + (whatever) you would get a constant speed, not an increase in speed till its going to fast.

How do i fix?

thx :)

I like toast