Wamphyri_101 Posted February 7, 2012 Share Posted February 7, 2012 Just bought Leadwerks I think it is a very good product amd I can't wait to get better with it. Im going thru the Lua video tutorials on Youtube and I hit a problem. On video 4 that discusses camera control it is using the scene.gmf file found here http://www.leadwerks.com/werkspace/page/Documentation/le2/_/tutorials/camera-controls-r385 The scene.gmf file will not open for me in the program demo. If i use any other gmf file it opens and it opens in the model viewer as well. I have the file in my project folder so that is not it. It just keeps telling me it can't load file am I doing something wrong? Here is the code I entered: require("Scripts/constants/engine_const") --Tells where to find models, etc. RegisterAbstractPath("") --Set Graphcs Mode Graphics(800,600) --Create Framework Object fw = CreateFramework() -- Creates main world --Set the camera camera = fw.main.camera camera:SetPosition(Vec3(0,2,-10)) --Create light light = CreateDirectionalLight() light:SetRotation(Vec3(45,45,0)) --Load a model scene = LoadMesh("abstract::scene.gmf") if scene == nil then --nil is not zero it is does not exist Notify("Failed To load File!!!!") end MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2) -- x,y on screen HideMouse(1) -- 1 is true camrotation = Vec3(0) --Main Loop while KeyHit(KEY_ESCAPE) == 0 do --As long as false gx = Curve (MouseX() - GraphicsWidth()/2,gx,10) gy = Curve (MouseY() - GraphicsHeight()/2,gy,10) MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2) -- x,y on screen camrotation.x = camrotation.x + gy /10 camrotation.y = camrotation.y - gx /10 camera:SetRotation(camrotation) fw:Update() fw:Render() Flip(0) end Any help would be appreciated. Quote Link to comment Share on other sites More sharing options...
macklebee Posted February 7, 2012 Share Posted February 7, 2012 Copy the engine.exe file from the SDK to the root of your project folder. Then open the ScriptEditor and select the Tools>Options dialog and set the location of the engine.exe that is located in your project folder. Edit- Also do not forget to copy the Scripts folder over to your project folder. Or you could do all of this inside your SDK folder. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Wamphyri_101 Posted February 7, 2012 Author Share Posted February 7, 2012 Yup I did that first thing. All the tutorials have worked up this point and I can load any other gmf files it seems but not this one. I was just wondering if there was something im missing, I put a diffrent file in there and it loads fine. Just that scene.gmf doesnt like to be loaded. Quote Link to comment Share on other sites More sharing options...
macklebee Posted February 7, 2012 Share Posted February 7, 2012 loads fine for me... using your posted program. if the scene model loads in the modelviewer then i suspect its just an issue of where it is located. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Wamphyri_101 Posted February 7, 2012 Author Share Posted February 7, 2012 Sorry for being dumb I did have the engine copied to my folder but i forgot to tell the editor to look there for it sorry. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.