vertex in view

Blitz3D Forums/Blitz3D Programming/vertex in view

The way I do it (which is, as far as I'm concerned, far more accurate when it comes down to a point in space):

TFormPoint VertexX(Surface,Index),VertexY(Surface,Index),VertexZ(Surface,Index),Mesh,0
CameraProject Camera,TFormedX(),TFormedY(),TFormedZ()

Visible = True

If ProjectedZ() <= 0 Then
     Visible = False
Else
     PX = ProjectedX()
     If PX < -4 Or PX > GraphicsWidth()+4 Then
          Visible = False
     Else
          PY = ProjectedY()
          If PY < -4 Or PY > GraphicsHeight()+4 Then
               Visible = False
          EndIf
     EndIf
EndIf