Andy Gilbert Posted March 3, 2013 Share Posted March 3, 2013 But this is used in the demo game included? It is attached to the camera? And has barberian as its target in the editor? But how was that set is what I'm trying to find out? I'm sure josh could tell us? Andy Quote The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do. Leadwerks Game-Ready 3D Models:https://sellfy.com/gib3d Link to comment Share on other sites More sharing options...
YouGroove Posted March 3, 2013 Share Posted March 3, 2013 Nope , in the demo game the barbarian have only AnimationManager and Player scripts attached. It's a simple travelling camera. I posted an example that works same here : http://www.leadwerks.com/werkspace/topic/6059-le-3-little-code-examples/ I'll gonna try to make some basic 3rd camera, wait a little. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Guest Red Ocktober Posted March 3, 2013 Share Posted March 3, 2013 and i'm still tinkering with the lightmapping thing... pray for me btw... nice looking terrain and sky you've got going there... --Mike Quote Link to comment Share on other sites More sharing options...
YouGroove Posted March 3, 2013 Share Posted March 3, 2013 self.entity:GoToPoint(20,0,-15,2.5,1); xpos=self.entity:GetPosition().x zpos=self.entity:GetPosition().z xpos=self.entity:GetPosition().x rotx=self.entity:GetRotation().x roty=self.entity:GetRotation().y rotz=self.entity:GetRotation().z camera:SetPosition(xpos ,3,zpos ) camera:SetRotation(rotx,roty,rotz) self.light:SetPosition(xpos,2,zpos ) ***************** but it don't work, caus the camera should be positionnned behind the model in some normal distance from the axe. So it will need some normal calculation i think. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
josk Posted March 3, 2013 Share Posted March 3, 2013 Nope , in the demo game the barbarian have only AnimationManager and Player scripts attached. It's a simple travelling camera. The Camera in the demo has the 3rdperson script attached. I could not find where it was set either. Are you ment to set in Editor but bugged? I set a Camera with basic controls in the App Script at the moment, I didn't need a 3rd person camera. Quote Elite Cobra Squad Link to comment Share on other sites More sharing options...
YouGroove Posted March 3, 2013 Share Posted March 3, 2013 Ok i just find in the editor you can create BSP stuff , but also lights, and also Camera (Miscellaneous list) I attached "3rdPersonFollow" to that camera i created on the editor and placed behind the golbin. I put on target field of the camera the Goblin model (from the "scene" panel view) So it should work , as my goblin just uses Navmesh and go to a point. But no way, the camera do anything and remains at same place. I think the scripts have some problems. I'll try to do my own camera script perhaps later. @Josk : A camera that follow the player staying always behind, this is 3 rd person camera In the demo this is a simple camera only moving along X and Z axis, that never rotates, thats not the same system. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Josh Posted March 3, 2013 Share Posted March 3, 2013 The camera needs a target value set so it know what to follow. Drag the entity node you want it to follow from the scene tree to the target field of the camera script. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
YouGroove Posted March 3, 2013 Share Posted March 3, 2013 That's what i done sir. But it don't work. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Josh Posted March 3, 2013 Share Posted March 3, 2013 Then you should post your map so I can try it myself. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
YouGroove Posted March 3, 2013 Share Posted March 3, 2013 Strange bug : I added a simple debugger line and the game just stops after launch ? function Script:Start() self.smoothness=60 if self.target==nil then return --Debug:Error("Script must have a target.") end Debug:Error("Script ok.") self.firstframe=true What is the problem with Debug:Error() ? Quote Stop toying and make games Link to comment Share on other sites More sharing options...
YouGroove Posted March 3, 2013 Share Posted March 3, 2013 @Josh : It will be complicated as i would need to save scripts, scene dierctory locations,. Because my project points to my own custom directories and assets. The simple way if you want to test is to use the demo game project. 1) remove camera from code. 2) create and place a camera using the editor 3) attach camera script to the new camera 4) drag barbarian player character to that camera target slot The camera shoudl follow the player. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Josh Posted March 3, 2013 Share Posted March 3, 2013 You could just zip up the project and post it. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
YouGroove Posted March 3, 2013 Share Posted March 3, 2013 It works in the game demo. I retested on my demo test. It seems to work also. What is wrong : This is not a rela 3rd person camera but a simple travelling camera , the script name should really be changed. It don't change camera placement and orientation : When you place your camera in the level created from the editor: the camera will keep that initial position. The camera is not visible like a mesh on the scene, it's just a point , os it's hard to see where the camera points ? And if you rotate it, you don't knwo anything about where you rotated it and where it points also. So yes the editor should have a real camera mesh representation. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Andy Gilbert Posted March 3, 2013 Share Posted March 3, 2013 Josh I too cannot seem to drag a model into the target box of the 3rdpersoncam script. I just get a red circle mouse icon? EDIT, dragging and dropping does work, but its obviously a bit decieving showing the wrong cursor icon. Andy Quote The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do. Leadwerks Game-Ready 3D Models:https://sellfy.com/gib3d Link to comment Share on other sites More sharing options...
YouGroove Posted March 3, 2013 Share Posted March 3, 2013 Yu must drag a model or skinMEsh from the "Scene" view panel : - select camera in the scene viwe : you have the field target appearing - on the scene view : drag the Barbarian model on the target field and release the mouse. After releasing the mouse the circel red icon will disappear and the barbarian will appear in the target. I think it's a display bug of drag and drop. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
josk Posted March 3, 2013 Share Posted March 3, 2013 Got it working by drag and drop. Quote Elite Cobra Squad Link to comment Share on other sites More sharing options...
Guest Red Ocktober Posted March 3, 2013 Share Posted March 3, 2013 going back to the Lightmapping question that was asked above http://www.leadwerks...rs/page__st__40 , i got an external hybrid lightmapped technique working... http://www.leadwerks.com/werkspace/page/gallery/_/giles-lightmapped-scene-in-leadwerks-3-r167 this is the same Giles lightmapped mesh that i got into Leadwerks 2... i just copied the folder over and massaged the .mat files for the new Editor... it doesn't use any of the lights or lightmapping (just the ambient light) effects... the results are exactly what youd see in Giles... i dunno if this is what Shad was looking for or if this is the preferred way of doing this... i'm still evaluating the capabilities of 3 and was curious to see if this methodology was feasible... --Mike Quote Link to comment Share on other sites More sharing options...
YouGroove Posted March 3, 2013 Share Posted March 3, 2013 I don't understand ? Do you use lightmapping ? model with 2 UVs ? Or do you used baked lightmapping in one texture ? Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Guest Red Ocktober Posted March 3, 2013 Share Posted March 3, 2013 1 - original model lightmapped in Giles... 2 - exported out as .x and .x_lmap 3 - load .x into UU3d 4 - merge .x_lmap in UU3D 5 - get rid of extensions in Group and Material names in UU3D 6 - save as .gmf from UU3D 7 - copy folder over to Leadwerks and make mat files (using corresponding ModelView surface references as guide) this should give you a usable .gmf for Leadwerks 2 Editor... you should be able to omit step 7 if exporting to Leadwerks 3 and let Editor make up mat files... use a diffuse shader for the lightmap materials, diffuse + normal shader for the others... note that this is a hybrid method... it doesn't need to be run through the lightmapper... just another way to get a lightmapped scene into L3... i'm still playing around to see what are the downsides of doing it this way... now, all i need is some water and fog... --Mike Quote Link to comment Share on other sites More sharing options...
YouGroove Posted March 4, 2013 Share Posted March 4, 2013 Feww , i can't imagine the day you'll have to procuce some 50 or 100 models for a game if you should keep that painfull workflow. I would let down lightmaps and go for dynamic lightq and shadows instead. LE3 Beta is a hard experience. Trying to get some stuff running, learning non so trivial Lua specific features and stuff, how works Lua in LE3 etc ... Lot of stuff, problems, stuck with Android compilation. But staying in the PC version for now, waiting for stable working Android version will be best. I think i can begin some PC version of a future mobile game. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Guest Red Ocktober Posted March 4, 2013 Share Posted March 4, 2013 yeah... hopefully that day will be loooooong in coming... 50 models!! actually, it's not that bad... i use 3DRAD to prototype a lot of my stuff (submarine interiors, buildings, rooms, etc)... so this is right up my alley... 3DRAD uses .x... i do my walkaround in 3DRAD, and when i'm satisfied i load the scene into Giles for the lightmap run... Giles scenes can be built up over time as you complete each new element... then, just let the lightmapper do its thing and save out the results... loading em into UU3D is painless... the only painful part is editing the group and material names to delete the extensions... then it's ready to go into Leadwerks... of course L3 would dave me some time and effort... but i need the intermediate walkthrough step just make sure the levels are scaled and spaced properly... and to check the appearances before i commit to lighting... Leadwerks 2 was the best as i could use the dynamic lighting... no need for lightmapping... but i found dynamic lights to be expensive in L2... Leadwerks 3 promises vast improvements... but right now i can't seem to get the same results that i get in Giles from the L3 Editor lightmapper... we'll see what happens... right now i'm sitting on the fence, still evaluating the Eval copy... oh yeah... i'm gonna play around with b3d meshes and using 2 uv maps... see if that reduces the workload any... --Mike Quote Link to comment Share on other sites More sharing options...
Andy Gilbert Posted March 4, 2013 Share Posted March 4, 2013 How do i create a new script using the new script editor? Andy Quote The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do. Leadwerks Game-Ready 3D Models:https://sellfy.com/gib3d Link to comment Share on other sites More sharing options...
Rastar Posted March 4, 2013 Share Posted March 4, 2013 You first have to get it open (e.g. by opening an existing script) and then click on the new icon (or File->New). I guess it would be more intuitive if you could directly open the Script Editor via the Tools menu Quote Link to comment Share on other sites More sharing options...
Chris Vossen Posted March 4, 2013 Author Share Posted March 4, 2013 How do i create a new script using the new script editor? Andy Along with the way Rastar outlined you could also: Right Click in the Assets Window and choose New->Script Quote Link to comment Share on other sites More sharing options...
Andy Gilbert Posted March 4, 2013 Share Posted March 4, 2013 Oh yea. So simple when you know. Thanks Andy 1 Quote The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do. Leadwerks Game-Ready 3D Models:https://sellfy.com/gib3d 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.