Hmm, well the closest I have so far is using a combination of EntityInView and DeltaPitch/DeltaYaw as originally suggested (similiar to how I was first trying to get this to work too).
Example:
Its not perfect yet and doesn't work if the camera rolls (which will be a problem as mine does up to about 70 degrees)
Example:
Const WIDTH=640,HEIGHT=480 Graphics3D WIDTH,HEIGHT,16,2 SetBuffer BackBuffer() camera=CreateCamera() PositionEntity camera,0,2,-10 light=CreateLight() RotateEntity light,90,0,0 plane=CreatePlane() cube=CreateCube() PositionEntity cube,0,1,0 HidePointer While Not KeyDown( 1 ) ;Mouse look TurnEntity Camera,Float#(MouseYSpeed())/3,-Float#(MouseXSpeed())/3,0 RotateEntity Camera,EntityPitch#(Camera),EntityYaw#(Camera),0 RenderNeeded=1 MoveMouse WIDTH/2,HEIGHT/2 RenderWorld Color 255,0,0 a=EntityInView(cube,camera) Text 0,5,"EntityInView: "+a If Not a dx#=DeltaPitch#(camera,cube) dy#=DeltaYaw#(camera,cube) If Abs(dx#)>Abs(dy#) f#=dy#/90 If dx#>0 y=HEIGHT Else y=0 EndIf x=WIDTH/2-WIDTH*f# f#=Abs(dx#/180) Else f#=0-(dx#/90) If dy#>0 x=0 Else x=WIDTH EndIf y=HEIGHT/2-HEIGHT*f# f#=Abs(dy#/180) EndIf size=5+f#*15.0 If x<0 Then x=0 If x>WIDTH Then x=WIDTH If y<0 Then y=0 If y>HEIGHT Then y=HEIGHT Color 0,255,0 Rect x-size/2,y-size/2,size,size,1 Color 255,0,0 Text 0,25,"Delta values: "+dx#+" , "+dy# Text 0,45,"Draw coords: "+x+" , "+y+" ("+size+")" EndIf Flip Wend End
Its not perfect yet and doesn't work if the camera rolls (which will be a problem as mine does up to about 70 degrees)