Off screen targert pointer

Blitz3D Forums/Blitz3D Programming/Off screen targert pointer

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.

Hmm... the code I used uses FONText and it wasn't too clear in what it was doing, so I knocked this little example up for you. You could still incorporate the EntityInView() thing if you didn't want the markers to appear when the target was in view:
Graphics3D 800,600

camera = CreateCamera()
cube = CreateCube()
light = CreateLight()
MoveEntity camera,0,3,-15


While Not KeyDown(1)
	If KeyDown(203) Then TurnEntity camera,0,1,0
	If KeyDown(205) Then TurnEntity camera,0,-1,0
	If KeyDown(200) Then TurnEntity camera,1,0,0
	If KeyDown(208) Then TurnEntity camera,-1,0,0
	RotateEntity camera,EntityPitch(camera),EntityYaw(camera),0
	CameraProject(camera,EntityX(cube),EntityY(cube),EntityZ(cube))
	X# = ProjectedX()
	Y# = ProjectedY()
	RenderWorld
	Oval 8,y,6,6,True
	Oval GraphicsWidth()-8,y,6,6,True
	Oval x,8,6,6,True
	Oval x,GraphicsHeight()-8,6,6,True
	Flip
Wend