• Content count

  • Joined

  • Last visited

  • Days Won


macklebee last won the day on July 15

macklebee had the most liked content!

Community Reputation

722 Excellent

About macklebee

  • Rank
    MG's Code Janitor
  • Birthday September 27

Profile Information

  • Gender
    Not Telling
  • Location

Recent Profile Visitors

14,737 profile views
  1. You did not make a Leadwerks material like mentioned and linked to above. To make a material, right click on the imported texture and select 'Generate Material'. Double-click the new material and add your textures and shaders to the material and save. Once you have the material created and you have imported the model into LE, double-click the model and it will open the Leadwerks Model Editor. You can attach your material to the model under the listed surface in the mesh hierarchy tab. See the tutorials about models and materials: Suggest you read all of the official tutorials as there is a lot of useful information available.
  2. If you scale an entity, its global AABB bounding box will also scale but for some reason the local aabb never changes. Appears the local AABB is based off the original size? You can see it realtime by using 'camera:SetDebugEntityBoxesMode(true)'. window = Window:Create("example",0,0,800,600,Window.Titlebar+Window.Center) context = Context:Create(window,4) world = World:Create() camera = Camera:Create() camera:SetPosition(0,0,-4) camera:SetDebugEntityBoxesMode(true) light = DirectionalLight:Create() light:SetRotation(35,35,0) box = Model:Box() box:SetColor(0,.5,0) toggle = 0 while window:KeyDown(Key.Escape)==false do if window:Closed() then break end box:Turn(0.5,0.3,0) if window:KeyHit(Key.Space) then toggle = 1 - toggle if toggle==1 then box:SetScale(2,2,2) else box:SetScale(1,1,1) end end Time:Update() world:Update() world:Render() context:SetBlendMode(Blend.Alpha) context:DrawText("Press SPACE to toggle box's scale",2,2) context:DrawText("box's Global AABB: ",2,22) context:DrawText("box's Local AABB: ",2,42) context:SetBlendMode(Blend.Solid) context:Sync(true) end
  3. Post the model with textures and the LE material you made for it or all we can do is randomly guess what the solution to your problem may be. Edit - my random guess is that either the model is being saved without an UV map or you havent created your LE material properly.
  4. Well, you can do an alpha mask by simply making the holes in the texture full alpha and using an inherent alpha-related shader. Look at how the textures for leaves are done to see an example or the section regarding custom shaders in the Materials tutorial:
  5. Thats because my custom geometry shaders use Draw()-related commands. So you are saying something as simple as text now will require a sprite? Sounds very counter-intuitive. How will custom buffers be supported? Or are they going to be officially supported finally in LE5?
  6. er - what? you need then to give access to the render thread so we can use drawing commands. All custom post-process and geometry shaders would be affected by this, would they not? A 2D sprite doesnt isnt quite the same. So you are saying GUI's now will all be sprites?
  7. Does it?
  8. Could be - I personally never had and honestly don't see the point of using textures that large, but to each his own. Have you tried scaling the texture down to a more reasonable size at half or 1/4 scale to see if you have the same issue? Out of curiosity, what is the file size of a 8Kx8K texture?
  9. Either provide the map so people can actually see the navmesh layout in the area shown in the video or make a video with the navmesh visible via the camera:SetDebugNavigationMode(true) - a map and the character in question is preferable though. And since its fairly dark in the video I cannot say for certain, but it appears maybe the character flips around at the point it stops chasing you. Possibly due to a character angle problem. When that character is placed into the LE scene, does it face its local +Z axis? or is it pointing the other way? Did you change the character angle to compensate for that? As far as playing animations back to back, just switch the sequence after the frame gets past the known animation length (entity:GetAnimationLength()). Granted this means you will need to count/track the animation frames yourself and use the older entity:SetAnimationFrame() instead of the new (and improved?) entity:PlayAnimation().
  10. Crouching works the same in 4.4 as it has for a couple of years and several versions with some caveats and unfortunately it is not an officially supported feature (and hasn't been since the LE2 days). The crouch height is 1.2 meters and the debug physics body does not change size at least visually when crouched, but you will be able to move a character controller under anything taller than 1.2 meters. Also note this example shows that when crouching under something, the developer needs to prevent standing back up to prevent weird physic results from occurring - ie character slingshot across map, character pushed through the map, etc... window = Window:Create("crouch height",0,0,800,600,Window.Titlebar+Window.Center) context = Context:Create(window) world = World:Create() camera = Camera:Create() camera:SetRotation(40,0,0) camera:Move(0,0,-8) light = DirectionalLight:Create() light:SetRotation(35,35,0) camera:SetDebugPhysicsMode(true) ground = Model:Box(10,1,10) ground:SetPosition(0,-0.5,0) ground:SetColor(0,1,0) shape = Shape:Box(0,0,0, 0,0,0, 10,1,10) ground:SetShape(shape) shape:Release() box1 = Model:Box(1,1.2,1) box1:SetPosition(-2,0.6,-1) box2 = Model:Box(1,1.2,1) box2:SetPosition(2,0.6,-1) box3 = Model:Box(5,1,1) box3:SetPosition(0,1.7,-1) shape = Shape:PolyMesh((box1:GetSurface(0))) box1:SetShape(shape) shape = Shape:PolyMesh((box2:GetSurface(0))) box2:SetShape(shape) shape = Shape:PolyMesh((box3:GetSurface(0))) box3:SetShape(shape) shape:Release() player = Pivot:Create() visiblecapsule = Model:Cylinder(16,player) visiblecapsule:SetScale(.8,1.8,.8) visiblecapsule:SetPosition(0,.9,0) player:SetPosition(-4,0,0) player:SetMass(1) player:SetPhysicsMode(Entity.CharacterPhysics) crouch = false while window:KeyHit(Key.Escape)==false do if window:Closed() then break end move = ((window:KeyDown(Key.W) and 1 or 0) - (window:KeyDown(Key.S) and 1 or 0))*4 strafe = ((window:KeyDown(Key.D)and 1 or 0) - (window:KeyDown(Key.A) and 1 or 0))*4 jump = (window:KeyHit(Key.Space) and 1 or 0)*8 if window:KeyHit(Key.C) then crouch = not crouch end player:SetInput(0,move,strafe,jump,crouch) Time:Update() world:Update() world:Render() context:SetBlendMode(Blend.Alpha) context:DrawText("Press WSAD to move and C to toggle crouch",2,2) context:DrawText("Crouched: "..tostring(crouch),2,22) context:SetBlendMode(Blend.Solid) context:Sync(true) end
  11. What is the texture size? When being used in LE what is the texture format you are using? If you are using textures that are not of the power of two size (1024 x 512, eg.) and you are using any of the compression formats (dxt1, dxt5, etc) or creating mipmaps, then LE will resize the texture to fit a power of two. If you are using textures that are not a power of two, then my suggestion would be to use no compression and no mipmaps.
  12. See this monthly script challenge for an example of what you are attempting:
  13. You should only look for one specific key hit per update cycle or you will have issues like this. Rework the code to check for the E key's keyhit only once. previous discussion:
  14. By default, the buoyancy mode for all objects is set to true. So all that is needed to make something float is to be a rigid body and have mass (and of course, the water be deep enough to allow the object to float). As for the water, there are several posts asking to do the same. Unless you are good at shaders and emitters for water effects, i would not suggest water to be a significant part of any LE game.
  15. window = Window:Create("Example", 0, 0, 800, 600, 17) context = Context:Create(window) world = World:Create() camera = Camera:Create() camera:SetPosition(0,.8,-1.8) light = DirectionalLight:Create() light:SetRotation(35,35,0) player = Model:Load("Models/characters/crawler/crawler.mdl") frame = 0 blend = 0.5 sequence = "Run" toggle =0 Spine1 = player:FindChild("Bip01 Spine1") while not window:KeyHit(Key.Escape) do if window:Closed() then return false end player:SetAnimationFrame(frame,blend,sequence,true) Spine1:SetAnimationFrame(frame,blend,"Attack1",true) frame = frame + Time:GetSpeed()/2.0 if window:KeyHit(Key.Space) then toggle = 1 - toggle if toggle==0 then sequence = "Run" blend = 0.0 else sequence = "Idle" blend = 0.0 end end blend = math.min(blend + Time:GetSpeed()/50.0, 1.0) Time:Update() world:Update() world:Render() context:SetBlendMode(Blend.Alpha) context:DrawText("Press Arrow Keys to Move Head",2,2) context:DrawText("Press Key to Toggle Animation",2,22) context:SetBlendMode(Blend.Solid) context:Sync(true) end