All Activity
- Past hour
-
The mesh class has a GetMaterial and SetMaterial command.
-
Caronte3D started following Are tags working?
-
local pick_info = world:Pick(p1, p0, 0, true) if pick_info.entity then pick_info.entity:AddTag("Enemy") -- The entity already have a tag (from editor) but try it for testing... Print("Enemy: "..pick_info.entity.name) -- This is ok and shows the name Print(pick_info.entity:HasTag("Enemy")) -- This is always false end It's a bug or... what I'm doing wrong?
- Today
-
I've been watching Leadwerks 5(ultra engine for a while now and found the video tutorials somewhat helpful but still don't feel comfortable to jump in and start a small project to learn the engine from a some what beginner level. my coding experience is from App game kit studio which uses a "Basic" coding style which felt more like component coding 3d, 2d, file, etc.. the rendering more or less handled by the core engine to avoid miss understanding how 2d/3d would overlap. I attempted adding GUI to the fps example in ultra engine before the migrations the leadwerks 5 name(so glad you return to this name btw) but i could not understand the rendering of GUI over 3d. Also could not find explanation on how the GUI in leadwerks can work within a 3d environment. I did try for a long 4hour session using AI to help me structure adding Gui to the FPS example. i attempted to add a crosshair in the middle of the screen using the interface commands but kept getting failure to render the crosshair or getting issues like the gun dispersing or getting culled. for the most part i think the AI was getting confused with older learkwerks code as there is not much for the Ai to learn from for leadwerks 5. I wonder if a complete command list that the AI could read might help with that later on( i tried using the help file on your website but the AI could not access it? or understand it) Suggestion That may help me and others for 2d Game GUi/interface: My thought for a Tutorial suggestion is game Gui in a working 3d example including things like hp, ammo or similar basic stuff but main focus explaining the work flow to create such Gui within a 3d environment and perhaps a menu system without the 3d scene. How i would envision the tutorial or perhaps multiple tutorials linked together on the same subject Example of a 2 part Gui Structuring including: Start Menu for project and 3d scene or game with Gui Explanation on how to transition between menus and 3d scene, perhaps a in 3d scene toggle menu like a Escape key to bring up a option menu overlay in scene. A pause game while in menu example would be a nice extra if easily possible. Explanation on how the 2d aspects of the engine render in relation to 3d and including a explanation on the deference's without a 3d scene(if require as i don't understand how they relate/work with each other myself) I believe this may help a lot of beginners in the sense of being overwhelmed in getting started with Leadwerks. I felt the same way when the first version of leadwerks was released. I only got as far as placing my own models in the editor as the coding side of things was hard to understand how to create a workflow and structure a basic project without having rendering issues between 2d aspects and 3d. I felt like the commands were explained but not the engine as a whole, no clear vision on how to structure code/scenes in a way that does not cause conflict on how the engine functions/renders components. The new Fps example is great as a demo but i feel the structure of how it works is complicated which leaves me having no idea of how any of it works. As a beginner i think there would benefits to a more component structure to this example, meaning less code integrated with the rest of the code which makes changing anything resulting in errors as we have not written the code our self's. I understand functions and see parts of what i would like to tinker with to try learn the engine but found that the function seem to be heavily reliant on other code to work resulting in being hard to peice the puzzle together when you have no understanding of the engine.(sorry if this seemed repeating myself, I'm hoping you can make sense of what I'm trying to convey) As a side note i believe for a previous communication there was no plan to add basic 2d commands for images or a sprite system but i would like to add this as a question in relation to how you envision 2d interfaces for projects. Question: Would there be a future plan for basic Image manipulation commands? or a basic sprite like image system for game overlays/menus? I would like to thank you you for reading my kinda lengthy suggestion to help beginners here, i absolutely love the potential of this engine and hope one day i can understand it enough to create a game with it in the future.
-
Thanks Josh, that explanation helps to understand the internal structure. What I’ve confirmed so far: If a model (or mesh) uses only one material, GetMaterial() and SetMaterial() work as expected and the material can be fully replaced. However, if the same mesh uses multiple materials (multiple material slots), Lua does not provide a way to replace a single material slot. In that case, SetMaterial() affects the entire model and individual materials cannot be swapped — only modified (e.g. emission, color). So replacing the eye material entirely is only possible when the eyes are exported as a separate child model, or when the model uses a single material. Please let me know if I’m missing something on the Lua side — happy to learn My model LOD1 —> mesh1 body :material |—> mesh1 eye: material
-
Murder Mittens joined the community
- Yesterday
-
Josh started following [lua] Entity SetMaterial Question
-
https://www.leadwerks.com/learn/Model?lang=lua https://www.leadwerks.com/learn/Lod?lang=lua mesh1 = model.lods[1],meshes[1] mesh2 = model.lods[1],meshes[2]
-
johndoe67 joined the community
-
burgelkat started following [lua] Entity SetMaterial Question
-
Hallo, If I have a skeletal model with one mesh but two materials, how can I access the second material? The second material is used for the eyes. At game start the eyes should be dead (no emission) and only start glowing after activation. If the eyes were a child entity, this would be easy. But what is the correct way when there is only one mesh?
- Last week
-
Josh started following Flag Shader
-
I plan on adding some preset vertex animation effects in 5.1. The easiest thing to do is just wait and it will be a setting in the material properties.
- 1 reply
-
- 1
-
-
5.0.2 beta Adjusted the behavior of search and replace fields in script editor. Adjusted behavior of search field in project tab. Wildcards are no longer used, it just does a simple lower-case find/match for the search term.
-
Increased input delay due to lack of control over render thread sync
Josh replied to vega's topic in Bug Reports
One really simple thing you can do is call camera->Sync() after the player update code. This will disable interpolation on the camera entity. -
It sounds like your hardware is producing different results, maybe based on power consumption or heat? Is this a laptop of a desktop? Maybe some kind of power throttling is occuring. If you have vertical sync enabled, then the framerate will just be limited to your screen refresh rate, so as long as you're that fast, there won't be any variation.
-
Okay, I understand, but to avoid creating new threads, I'll ask this question in this thread: Every time, when i run my project in leadwerks game editor, I get different FPS (I got less of 10 to 15 FPS sometimes). Every time same map, same player and camera location and rotation on map, but different fps. Why is this happening? This is very annoying!
-
burgelkat started following Flag Shader
-
Hello, does someone have a flag shader for leadwerks 5? i tryed to Build one but shaders are difficult for me. in leadwerks 4 there is one but shaders are different in the new engine
-
ccfbdvbd joined the community
-
Monkey Frog Studio started following Snap to Top
-
Hello. Not sure what to call this one, but in another game engine's editor, they have a feature where you can drag in an asset (model) and cause it to snap to the top of assets (models, terrain faces, etc.) already in the scene. It makes it very easy to drag in items and place them on a desk, on a shelf, etc. You drag in the item and, if this feature is toggled on, the item will snap to the terrain or grid floor or floor tiles. If you move it over a model, it snaps to the collision box/mesh's top. So, if it's a table, the object is now at the top and you can slide it around until you get it where you want. I'd love top see something like this in Leadwerks as it makes setting up things in a level very fast and simple. You want to populate items on a desk or around the floor, easy. No need to drag in an object, position it at the right height first, and then move it about. Drag, drop, done.
-
- 1
-
-
Josh started following LE 4.6 Strange Piece of Code (FPSPlayer)
-
It looks like this was some code to lower the weapon when you are close to a wall, but the part that would make this work is commented out.
-
5.0.2 beta Adjusted the behavior of typing into editable comboboxes.
-
5.0.2 beta Added option in general settings to not show the project name in the title bar. WASD keys can now be remapped, for users who don't have English keyboards with WASD keys in the top-left. Open the file "C:\ProgramData\Leadwerks\settings.json" and find the section called "controls". You can modify the navigation keys here. It's not the ideal user experience right now, but this is just the first step. "controls": { "back": 83, "down": 81, "forward": 87, "left": 65, "right": 68, "up": 69 },
-
When a mesh collider is used, the object will be static. Maybe the entity collision type isn't set correctly, but it doesn't make any sense to use a box collider for this anyways. A character like this would either use the player physics mode or would be attached to a navigation agent, for enemy AI.
-
@Josh When I set the model's physical collider to box (fig.1), the model falls to the floor at the start of the level (fig.2). But when I set the model's physical collider to mesh (fig.3), the model doesn't fall to the floor (fig.4).
-
Hi Josh. The default FPSPlayer in Leadwerks 4.6 has a strange piece of code that seems to run when the player gets hit. If I delete it, nothing really changes, but the FPS goes up by about 7. What was that code for?
-
Everything is good
-
Seba12sj joined the community
-
Mariusz W joined the community
-
Hello, I'd like to suggest that a 'scatter' tool or brush be added to Leadwerks in the future. The purpose is to quickly drop down things like debris in a level. This would have to work with both level brushes (the box, wedge, cylinder, and cone) and imported models (for both level geometry, like floors, and props, like tables). It should use physics and collision to allow for objects to be dropped onto surfaces. Like the brush for terrain, you should be able to select which models to use for your debris. And it should have parameters for brush size (how far debris is scattered), amount (how much debris is scattered), etc. Thanks.
-
- 1
-
-
Gilbel0889 joined the community
-
5.0.1 Version 5.0.1 is now on the default branch. This removes the need for a system environment variable for C++ projects, and fixes several bugs. Beta and default are in sync. Version 5.0.0 is now archived.
-
camera:SetRange(near, far) will do it.
-
There is no "current" camera. There's just cameras. You could do this: local entities = world:GetEntities() local n for n = 1, #entities do local camera = Camera(entities[n]) if camera ~= nil then if camera:GetHidden() == false and camera:GetProjectionMode() ~= PROJECTION_NONE then --this is probably the camera you want end end end
- 1 reply
-
- 1
-
-
TEDERIs joined the community
-
Without knowing her name?