Here's a demo to show the culling bug. Move the mouse slowly to the left after you press F1:
require("Scripts/constants/engine_const")
--Setup stuff for standalone lua game
Graphics(640,480)
RegisterAbstractPath("")
fw=CreateFramework()
a=CreateCube()
a:SetPositionf(0,-5,100)
ScaleEntity(a,Vec3(20,5,1000))
CameraRange(fw.main.camera,1,10000)
camerapitch=0
camerayaw=0
CreateDirectionalLight()
--main function
while KeyHit(KEY_ESCAPE)==0 do
--Keyboard
if(KeyHit(KEY_F1)==1) then
camerayaw = 140.76
camerapitch = 25.186613399482
end
--Camera look
gx=GraphicsWidth()/2
gy=GraphicsHeight()/2
dx=Curve((MouseX()-gx)/4.0,dx,3.0/AppSpeed())
dy=Curve((MouseY()-gy)/4.0,dy,3.0/AppSpeed())
MoveMouse(gx,gy)
camerapitch=camerapitch+dy
camerayaw=camerayaw-dx
camerapitch=math.min(camerapitch,90)
camerapitch=math.max(camerapitch,-90)
fw.main.camera:SetRotationf(camerapitch,camerayaw,0,1)
--Rendering
fw:Update()
fw:Render()
DrawText(camerayaw ,1,20)
DrawText(camerapitch,1,40)
DrawText("Press F1 to find culling spot",1,60)
Flip(0)
end