One quick question here

Blitz3D Forums/Blitz3D Programming/One quick question here

My question is

Can you control the camera with the movement of the mouse alone If so how?

Of course.

Just reset the mousepointer to the center of the screen every now an then and then check how far it has moved.

Andy

You can use MouseYSpeed() for walking forward and backward, and MouseXSpeed to turn around. Of course, while frequently reseting the mousepointer to the center of the screen, as Andy suggested.

MouseXSpeed() example;

Const PelStep = 8

Graphics3D 640,480,32,2
Camera=CreateCamera()
Light=CreateLight(Camera)

PelCount=64
LastPel=PelCount-1
RoomTexture=CreateTexture(PelCount,PelCount,1)

SetBuffer TextureBuffer(RoomTexture)
ClsColor 0,200,0
Cls
For X=False To LastPel Step PelStep
	For Y=False To LastPel Step PelStep
		WritePixel X,Y,False
	Next
Next
SetBuffer BackBuffer()

RoomEntity=CreateCube()
ScaleEntity RoomEntity,-10,-10,-10
EntityTexture RoomEntity,RoomTexture

Repeat
	
	TurnEntity Camera,0,MouseXSpeed(),0
	RenderWorld
	Flip
	
Until KeyHit(1)