ts-soft hat geschrieben:fw.Main.camera
Was soll das sein? Aus welcher Sprache hast Du versucht was zu übersetzen?
Kurze Erklärung hierzu - ich bastel derzeit mit Leadwerks Engine rum - das include läuft einwandfrei...
Kleiner Auszug:
Code: Alles auswählen
Prototype.i LECreateFramework ( )
Prototype LEFreeFramework ( *fw.TFramework )
Prototype LERenderFramework ( )
Prototype LEUpdateFramework ( )
Prototype LESetStats ( mode.i )
Prototype LESetWireframe ( mode.i=1 )
Prototype LESetZoom ( zoom.f )
Prototype LEResetFramework ( )
Prototype LESetContrast ( contrast.f )
Prototype LESetBrightness ( brightness.f )
Prototype LESetSaturation ( saturation.f )
Prototype LESetHDR ( mode.i )
Prototype LESetBackgroundMode ( mode.i )
Prototype LESetSkybox ( material.i )
Prototype LESetDistanceFog ( mode.i )
Prototype LESetDistanceFogColor ( *color.TVec4 )
Prototype LESetDistanceFogAngle ( start.f, stop.f )
Prototype LESetDistanceFogRange ( nearrange.f, farrange.f )
Prototype LESetBloom ( mode.i )
Prototype LESetBackgroundColor ( *color.TVec4 )
Prototype LESetNearDOF ( mode.i )
Prototype LESetFarDOF ( mode.i )
Prototype LESetNearDOFStrength ( strength.f )
Prototype LESetFarDOFStrength ( strength.f )
Prototype LESetNearDOFRange ( start.f, stop.f )
Prototype LESetFarDOFRange ( start.f, stop.f )
Prototype LESetGodRays ( mode.i )
Prototype LESetSSAO ( mode.i )
Prototype LESetAntialias ( mode.i )
Prototype LESetWater ( mode.i )
Prototype LESetWaterWaveSpeed ( speed.f )
Prototype LESetWaterHeight ( height.f )
Prototype LESetWaterColor ( *color.TVec4, *submersioncolor.TVec4 )
Prototype LESetWaterSoftness ( softness.f )
Prototype LESetWaterVisibility ( nearrange.f, farrange.f )
Prototype LESetWaterAmplitude ( amplitude.f )
Prototype.i LEGetFrameworkLayer ( index.i )
Prototype.i LEGetLayerWorld ( layer.i )
Prototype.i LEGetLayerCamera ( layer.i )
Prototype.i LEGetFrameworkListener ( )
Prototype LESetReflectionElements ( elements.i )
Wer das funktionierende include braucht für die Leadwerks Engine - einfach kleines pm an mich. Evtl lade ich es die Tage mal auf nen Server hoch.
Hab da auch schon paar Problemchen mit dem Dingens:
Es gibt eine Procedure die heißt
Code: Alles auswählen
Procedure Vec3 (*Result.Tvec3, px.f=0, py.f=#MAX_DEC, pz.f=#MAX_DEC )
With *Result
\X = px
If py=#MAX_DEC
\Y = px
Else
\Y = py
EndIf
If pz=#MAX_DEC
\Z = px
Else
\Z = pz
EndIf
EndWith
ProcedureReturn *Result
EndProcedure
Mein Hauptteil schaut so aus:
Code: Alles auswählen
EnableExplicit
XIncludeFile ("hw_engine.pbi")
;XIncludeFile ("hw_controlcam.pbi")
;XIncludeFile ("hw_screenrequester.pbi")
Define VResult.TVec3 ;if an expression requires more than one vec3 then define VResult2.TVec3, VResult3TVec3, etc ... for each vec3
Define sx.i
Define sy.i
Define framework.i
Define Lua.i
Define Camera.i
Define scene.i
Define player.i
Define font.i
Define move.f
Define strafe.f
Define jump.f
Define camrotation
Define camrotation_x.f
Define camrotation_y.f
Define mouse_x.f
Define mouse_y.f
Define playerpos
LERegisterAbstractPath(GetCurrentDirectory())
LESetAppTitle("Hiveworx Framework")
sx = 1024
sy = 768
If LEGraphics(sx,sy)>0
framework = LECreateFramework()
If framework>0
Lua = LEGetLuaState()
LELua_pushobject(Lua, framework);
LELua_setglobal(Lua, "fw");
LELua_pop(Lua, 1);
Camera = LEGetLayerCamera(LEGetFrameworkLayer(0))
LEPositionEntity(camera, Vec3(VResult,0, 350,0))
scene = LELoadScene("abstract::test001.sbx")
LEEntityType(scene,2,1)
player = LECreateController(1.8,0.4,0.5,45,0)
LEEntityType(player,1)
LESetStats(2)
font=LELoadFont("abstract::Arial12Shadow")
LESetFont(font)
move.f=0.0
strafe.f=0.0
jump.f=0.0
LEMoveMouse(LEGraphicsWidth()/2,LEGraphicsHeight()/2)
LEHideMouse()
XIncludeFile ("hw_grafikoptionen.pbi")
While (LEKeyHit(#KEY_ESCAPE)=0) And (LEAppTerminate()=0)
;-Mouse Look
mouse_x.f=Curve(LEMouseX()-LEGraphicsWidth()/2,mouse_x.f,6.0)
mouse_y.f=Curve(LEMouseY()-LEGraphicsHeight()/2,mouse_y.f,6.0)
LEMoveMouse(LEGraphicsWidth()/2,LEGraphicsHeight()/2)
camrotation=LEEntityRotation(camera,Vec3(VResult, mouse_y.f, mouse_x.f, 0))
camrotation_x.f=camrotation_x.f-mouse_x/10
camrotation_y.f=camrotation_y.f+mouse_y/10
LERotateEntity(camera,Vec3(VResult, camrotation_y.f, camrotation_x.f, 0))
;-Player movement
move=LEKeyDown(#KEY_W)-LEKeyDown(#KEY_S)
strafe=LEKeyDown(#KEY_D)-LEKeyDown(#KEY_A)
;-Set controller Input
LEUpdateController(player,Vec3(VResult, camrotation_y.f, camrotation_x.f, 0),move,strafe,jump,0.5);
;- Position Camera
playerpos=LEEntityPosition(player,Vec3(VResult),0)
;playerpos\y=playerpos\y+1.75
LEPositionEntity(camera,playerpos,0)
LEUpdateFramework() ;Update timing And world
LERenderFramework() ;Render
LESetBlend(1)
LEDrawText("CamPosX: ",800,20)
LEDrawText("CamPosY: ",800,40)
LEDrawText("CamPosZ: ",800,60)
LESetBlend(0)
LEFlip(0) ;Send to screen
Wend
Else
LEAppLog("ERROR: Failed to create Framework")
EndIf
LEFreeFramework(framework)
Else
LEAppLog("ERROR: Failed to create or set graphics mode")
EndIf
LEEndRender()
CloseLibrary(#Engine_Library)
mir gelignt das hier leider nicht:
;playerpos\y=playerpos\y+1.75
LEPositionEntity(camera,playerpos,0)
Letztere Zeile crashed die Engine - vorletzte Zeile mault der COmpiler dass es keine STructur gibt und ich weiß nicht wie ich sie definieren kann/soll.
LG