-
Posts
4,978 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by YouGroove
-
Leadwerks 3 "How do I ____?" Questions and Answers
YouGroove replied to Chris Vossen's topic in Programming
That's what i done sir. But it don't work. -
Leadwerks 3 "How do I ____?" Questions and Answers
YouGroove replied to Chris Vossen's topic in Programming
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. -
Why does it works in the game demo darkness awaits ? Is it some rotation applied in the code ?
-
Leadwerks 3 "How do I ____?" Questions and Answers
YouGroove replied to Chris Vossen's topic in Programming
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. -
Leadwerks 3 "How do I ____?" Questions and Answers
YouGroove replied to Chris Vossen's topic in Programming
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. -
We assume camera is a global variable declared like that in App.lua it's global so you can access it from any other script : camera = Camera:Create() camera:SetRotation(35,0,0) camera:Move(0,0,-30) On your goblinAI script or characterAI script or other : You can access your position character by calling the good function : xpos=self.entity:GetPosition().x zpos=self.entity:GetPosition().z xpos=self.entity:GetPosition().x camera:SetPosition(xpos,5,zpos-5) Because camera was not delcared as self.camera or local.camera, it's a global variable so you can access it and change the position with some values of the character position. Perhaps i don't understood what you really need ?
-
I tested with the goblin and it do the same ? It must be my settings as it works on the game "darkness awaits".
-
Or bring it to some 3D modeler and put a rotation before export. Gaining CPU cycles on mobile is lot more preferable.
-
I like terrain textures, the wood wrecked platform, and texture of the simple building. But the level is a bit empty, the ater is too transparent and clean, some bushes or other trees would be welcome to avoid too much emptyness. Yes the overall package and textures, movement of NPC, all in motion, indeed look as great as stalker on PC Keep it up. I think lot of people will be able ot make such game with LE3 easyly without coding too much (NavMesh, simple AI script templates , camera movements templates , flowgraphs etc ...)
-
Leadwerks 3 "How do I ____?" Questions and Answers
YouGroove replied to Chris Vossen's topic in Programming
I don't think this code is valid ? It don't contain any camera declaration ? IF you attach this script to your character it won't work caus it is script to attacha camera it seems. And camera are not an object you can pick up in the scene, so you can't bind it it seems. Perhaps i'm wrong ? Why not coding your own camera until some good camera template appears ? -
A good suggestion from Rystar : I agree automatic conversion is done when we use the import menu. Could it be possible to have the drag and drop directly from a file in some explorer that would be automatically converted ? And when drag and drop the image on some material slot, the image would be converted automatically than placed in the same directory of the material automatically.
-
"_s" is for specular. But you don't have to respect that convention you could call it : "specularMap.jpeg" A suggestion: It would be great if you could drag 'n drop the normal and specular textures from the asset explorer into the slots in the material editor. Even better if you could do that from the file system with an automatic import in between Good point, automatic conversion as it is done already when you import the texture from import menu.
-
I tried : Rotation 180 for rotation in Y on the "general" panel Same rotation in "Physics" panel for "shape rotation" even boths ? The character always turns automatically ? strange ? It must be something with orientation or origin ?
-
I use in the main loop of the game the function : self.entity:GoToPoint(20,0,-15,2.5,1); But the character always turns and runs backwards ? Strange ? Is there a way to keep it be facing the direction he runs or walks ? In the pic you can see i drawed the direction he runs and you can see it runs but he is not turned in the right direction ?
-
Leadwerks 3 "How do I ____?" Questions and Answers
YouGroove replied to Chris Vossen's topic in Programming
It's in the code that you must detect goblins and set a target or directly set the target to some point in the space. -
ok it must be me I'll try some simple scene example with a truning light.
-
I agree, shaders seems to be fixed , rotating model keeps normal maps and specular the same I think the shaders seems to be working woth a hard coded light fixed in the shader code. I placed a dynamic light in the scene but it had no influence on the normal map shader in the character ? In fact the light seems to light in some uniform way the character like some diffuse system, not like some normal map and dynamic light system ? Because i will try Android, i won't go for shaders, but keep simple lightening. But i paid for a PC package also So it would be great to have shaders reacting to lights in the PC version.
-
Well actual lights don't hae any color functions or parameters could it be dynamic. I choosen a color for static caus it's possible in appearence tab panel, but nothing the light static stays white ? So will colors be available for dynamic lights and static BSP lightmapping ? ********************** Anyway i just found how to have BSP blocks work with lightmaps and dynamic lights : You must choose as texture a material having a shader that comes from the "DYNAMIC" directory in shaders directory. Some test :
-
******************************** A camera that will follow the entity that is moving in the X axis : ********************************** 1) in App.lua declare the global camera entity : function App:Start() ... --Create a world f.world=World:Create() ... camera = Camera:Create() camera:SetRotation(35,0,0) camera:Move(0,0,-30) ... return true end 2) in the character AI lua script in the updatePhysics loop just add these lines : function Script:UpdatePhysics() local time=Time:GetCurrent() self.entity:GoToPoint(20,0,-15,1.4,1); xpos=self.entity:GetPosition().x camera:SetPosition(xpos,10,-30) self.entity.animationmanager:SetAnimationSequence(self.sequence.walk,0.04,200) end ****************** How it works : We get position in X axes of the character that is moving by calling : xpos=self.entity:GetPosition().x Then we change camera position in X axis with the value of the character in X axis : camera:SetPosition(xpos,10,-30) So the camera will follow the character in the X axis as it moves. You can extend the script and do the same with Z value or Y if the character would climb some stairs.
-
Leadwerks 3 "How do I ____?" Questions and Answers
YouGroove replied to Chris Vossen's topic in Programming
I have noather question : I have that code in App.lua : local camera = Camera:Create() camera:SetRotation(35,0,0) camera:Move(0,0,-30) It is possible to access to that camera from another script file attached to a character ? like simpleAI.lua ? the camera is already global, because nto declared with self.camera ? os i should be able to use it anywhere ? My calera is created in App.lua And this code on simpleAI.lua attached ot a character don't work : self.entity:GoToPoint(20,0,-15,1.4,1); camera:Move(self.entity:getPosition().x,0,-30) -
Leadwerks 3 "How do I ____?" Questions and Answers
YouGroove replied to Chris Vossen's topic in Programming
How to the more simply possible : It's for some shooting example basic tutorial on space ship that can shoot others : - Create a model or an array of models at runtime by Lua programming - make it non collision and invisible - switch to collision and visible - move it to a point (i think i knwo how to do) - on collision : detect what entity is hit - make the model invisible , non collision - keep the model to reuse it (like position on y = -1000) - and at least remove it from the scene and memory (like game finished and return to menu) -
Leadwerks 3 "How do I ____?" Questions and Answers
YouGroove replied to Chris Vossen's topic in Programming
I tested even having one UV only, i thaught LE 3 would create a second UV but nope. Lightmapping only works on BSP. And if it worked on models, how would we do if we had normap map shader ? could lightmapping work with it ? It's really complicated i think. If you need shadows, you'll have to wait fro some next update , than not use BSP, but models with shaders and shadows, i thinks they will be the two main ways of LE 3 : BSP + lightmaps Models + shaders + shadows -
Great , DistanceToPoint will do it. thanks
-
for PC games so. For mobile i won't bet on deferred lightening, not today. Have you a game idea where you will really need Deferred ? SHould not be enought with closest real lights activated as players comes near ? Lot of people asks eye candy feature, without having a real game idea behind. I have some game plan, i need actual graphics basics and just real time lighetning, deffered not necessary.
-
After update no Eclipse projects anywhere and re publish Android game ? what is going on ? In fact Andorid publishing only publish the ressources nothing else more.