Mouse Wheel Camera

Blitz3D Forums/Blitz3D Programming/Mouse Wheel Camera

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.

Do you meen something more like this?
;grid based camera with mouse wheel.
;Todo list 
;first lock a plane to the mouse that has a grid 
	;call it local_plane
;second make another grid that the mousegrid overlay
	;call it global_plane
;Third make a raze and lower function that raises the grid you know like in maplet
;forth make a fuction to create all of blitzs primitives
; if I get this far I'll write fith,sixth ect...

Graphics3D 640,480 
SetBuffer BackBuffer() 
SeedRnd MilliSecs() 
lite=CreateLight()

point=CreateSprite()
EntityColor point,255,0,0
PositionEntity point,0,0,10

Global camera=CreateCamera(point)
PositionEntity camera,0,0,0
;RotateEntity camera,0,0,0

 
local_plane=CreateTerrain(16)
;Load your grid texture here
;grid=LoadTexture("data/Maper_grid.bmp")
;EntityTexture local_plane,grid
EntityColor local_plane,0,255,0
PositionEntity local_plane,0,-5,0






PointEntity camera,point



;***************************************************************************************************
;Start of Main loop*********************************************************************************
;***************************************************************************************************

While Not KeyDown( 1 )

 
PositionEntity point,EntityX(point),0,MouseZ()
SpriteViewMode point,3

;PositionEntity local_plane, EntityX(point),-5,EntityZ(point)

 

If KeyDown( 205 )=True Then TurnEntity point,0,-1,0 
If KeyDown( 203 )=True Then TurnEntity point,0,1,0 
If KeyDown( 208 )=True Then MoveEntity point,0,0,-0.05 
If KeyDown( 200 )=True Then MoveEntity point,0,0,0.05 

UpdateWorld()

RenderWorld 
Text 10,20,"camera position:"+(EntityX(point))+" "+EntityY(point)+" "+EntityZ(point)
 

Flip 

Wend 
;**************************************************************************************************
;End of Mainloop***********************************************************************************
;**************************************************************************************************
End