Neues Irrlicht-Projekt: Fehler? o.O

  • Halli hallo hallöchen.
    Heut hab ich en neues One-man-Irrlicht-Nebenprojekt gestartet.
    [Blockierte Grafik: http://bildupload.sro.at/a/images/33-screenshot.jpg]

    [autoit]

    #include "au3Irrlicht2.au3"
    #include<misc.au3>
    _IrrStart( $IRR_EDT_OPENGL, @desktopwidth, @desktopheight, $IRR_BITS_PER_PIXEL_32, _
    $IRR_WINDOWED, $IRR_SHADOWS, $IRR_capture_EVENTS, $IRR_VERTICAL_SYNC_ON )
    _IrrSetWindowCaption( "Mein neues Projekt :) " )
    $WaterMesh = _IrrAddHillPlaneMesh( "Flache", 8.0, 8.0, 32, 32, 0, 0.0, 4, 3, 8, 8 )
    $WaterNode = _IrrAddWaterSurfaceSceneNode( $WaterMesh )
    _irrsetnodescale($waternode,10,1,10)
    $waterTexture = _IrrGetTexture( @scriptdir& "\water.png" )
    _IrrSetNodeMaterialTexture( $WaterNode, $waterTexture, 0)
    _IrrSetNodeMaterialFlag( $WaterNode, $IRR_EMF_LIGHTING, $IRR_Off )
    _IrrSetNodeMaterialType ( $WaterNode, $IRR_EMT_REFLECTION_2_LAYER)
    $camera = _irraddfpscamera(0, 100, 0.2, -1, 0, 1, 0)
    _irrsetnodeposition($camera, 0, 20, 0)
    $skydometexture= _irrgettexture(@scriptdir&"\skydome4.png")
    _IrrAddSkyDomeToScene($skydometexture, 10, 10, 1, 100, 1000.0)
    $CloudTexture = _IrrGetTexture( @scriptdir&"\cloud4.png" )
    $CloudNode = _IrrAddClouds( $CloudTexture, 10,5,1000 )
    _IrrSetNodeMaterialFlag( $CloudNode, $IRR_EMF_FOG_ENABLE, $IRR_ON )
    _IrrSetNodePosition( $CloudNode, 0,1500,0 )
    _IrrAddRotationAnimator( $CloudNode, 0, 0.1, 0 )
    for $i= -1250 to 1250 step +250
    _IrrDraw3DLine($i, 31, -1250, $i,31, 1250, 255, 255, 0)
    next

    [/autoit][autoit][/autoit][autoit]

    WHILE _IrrRunning()

    [/autoit][autoit][/autoit][autoit]

    $pos= _irrgetnodeposition($camera)
    if _ispressed(01) then Msgbox(0, "", "X=" & $pos[0]& @crlf & "Z="& $pos[2])
    If $pos[0]<-1250 or $pos[0]>1250 or $pos[2]<-1250 or $pos[2]>1250 then
    msgbox(0, "", "You are at the map's end")
    _irrsetnodeposition($camera, 0, 10, 0)
    endif
    _IrrBeginScene( 0, 50, 255 )
    _IrrDrawScene()

    [/autoit][autoit][/autoit][autoit]

    _IrrEndScene()
    WEND

    [/autoit]


    Es soll bis jetzt nur ne Map erstellt werden.
    Über die Wasseroberfläche soll ein Koordinatensystem gezeichnet werden. Für die x-Werte hab ich das schon gemacht, bzw. versucht zu machen.
    Entweder is da en Fehler in der Logik der For-schleife...oder.... was weiß ich...
    Die 3d-Linie wird auf jeden Fall nicht gezeichnet 8|
    Weiß jemand weiter?
    Die Jpg's/png's werden für die korrekte Ansicht benötigt. Irrlicht-Dlls in system 32 und include im ordner, wäre von vorteil.
    gruß billie
    Edit: Die For-schleife muss zwischen _irrbeginscene und _irrdrawscene. Problem gelöst.