-
Posts
3,946 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by macklebee
-
I suspect when your player hits the TriggerPain it causes multiple calls to the Script:Collision() function and not just one call on contact. You can verify by putting in a 'System:Print("made contact") in the collision function. So you would have to put a check into the Script:Collision() embedded into your other nested if/then statements like: function Script:Collision(entity, position, normal, speed) if self.enabled then self.enabled== false --disable after first call if entity.script then if type(entity.script.TakeDamage)=="function" then entity.script:TakeDamage(self.damage) end end end end then set 'script.enabled' to true at the end of the Script:Respawn() function
-
Can't change font of script editor
macklebee replied to rkido's topic in Leadwerks Engine Bug Reports
I don't know on linux, but in windows the leadwerks.cfg is located in the Leadwerks directory where your projects folder is located. In that file, there are two properties named: IDEFontName="Consolas" IDEFontSize=10 -
Steam Auto-update getting deleted by Anti-Virus
macklebee replied to Defranco's topic in Leadwerks Engine Bug Reports
Are you using Norton Anti-virus? Because someone just posted the same thing on the steam forum: http://steamcommunity.com/app/251810/discussions/0/451851477879282619/ I would say its a false positive as my Malwarebytes has no issues with Leadwerks. -
Here is a small example of an orbital camera around an object like in the video you posted: window = Window:Create("Orbital Camera",0,0,800,600,Window.Titlebar+Window.Center) context = Context:Create(window) world = World:Create() camera = Camera:Create() camera:SetSkybox("Materials/Sky/skybox_texture.tex") light = DirectionalLight:Create() light:SetRotation(35,35,0) player = Model:Load("Models/Characters/generic/generic.mdl") player:SetColor(0,1,0,1) pivot = Pivot:Create() pivot:SetPosition(0,0.8,0) camera:SetParent(pivot) camera:Move(0,1,-3) mx = 0 my = 0 prevmx = 0 prevmy = 0 toggle = 0 while window:KeyDown(Key.Escape)==false do if window:Closed() then break end if window:MouseHit(Key.RButton) then toggle = 1 end if window:MouseDown(Key.RButton) then mousepos = window:GetMousePosition() mx = pivot:GetRotation().x + (mousepos.y-prevmy) my = pivot:GetRotation().y + (mousepos.x-prevmx) if toggle==1 then toggle = 0 mx = pivot:GetRotation().x my = pivot:GetRotation().y end pivot:SetRotation(mx,my,pivot:GetRotation().z) prevmx = mousepos.x prevmy = mousepos.y end Time:Update() world:Update() world:Render() context:SetBlendMode(Blend.Alpha) context:DrawText(string.format("FPS: %.1f",Time:UPS()), 2, 2) context:DrawText("Hold Right Mouse Button Down to Rotate", 2, 22) context:SetBlendMode(Blend.Solid) context:Sync(true) end
-
Vegetation Not Loading, Only Billboards
macklebee replied to FireAndIce22's topic in General Discussion
I think half the faces on the individual palm leaves are flipped. By using LE's Model Editor to flip faces, you can see the lighted area on sections of the individual leaves swap location. -
Something is/was different. It was very repeatable for me yesterday using the beta versus opting out. Today it only happened twice out of 10 starts using the beta. Possibly a steam issue - don't know.
-
Vegetation Not Loading, Only Billboards
macklebee replied to FireAndIce22's topic in General Discussion
You can try to add the shadow+alphamask.shader to the Shadow slot in the material to see if that helps, but i suspect the problem is the model. Typically you would also want the leaves and the trunk to be separate textures so you wouldn't have to apply the same shaders/material settings to both surfaces on the model. Also some of those palm leaf surfaces could have flipped faces, but you would have to use an external modeling editor to confirm/fix. -
Its a feature request that has been asked since the first days of LE3. No word if it will ever become a reality.
-
Vegetation Not Loading, Only Billboards
macklebee replied to FireAndIce22's topic in General Discussion
ok - there are multiple issues: 1) Open the texture in the texture editor and save it as a DXT5 to enable alpha transparency and save the file 2) Right click the texture in the asset panel and generate a normal map 3) In the material, dont use Alpha for the BlendMode - use Solid. 4) In the material, check cast shadows, two-sided (optional), depth test/mask 5) In the material, set the new normal texture to the Normal slot 6) In the material, set the shader to Shaders/Models/diffuse+normal+alphamask.shader 7) Add appropriate vegetation shaders if needed. -
Vegetation Not Loading, Only Billboards
macklebee replied to FireAndIce22's topic in General Discussion
looks like Z-sort is enabled or the depth test/mask isnt enabled in the material? would need to see your material files for the tree to be able to say for certain. -
Vegetation Not Loading, Only Billboards
macklebee replied to FireAndIce22's topic in General Discussion
if you are going to use non-default vegetation models like the barrel, I believe you still have to apply the vegetation shaders to the material file. -
Yep same problem. Beta fails to load anything other than the splashscreen. Previous build seems to work correctly.
-
Set the player's PickMode to 0 to disable picking it. See Entity:SetPickMode() for more details.
-
Is the view going to be from the player's perspective or will the camera be showing the scene like your picture above? If from the player's perspective, then your code that you just posted will work. If the camera is not looking from the player's perspective, then there a couple of ways to perform the pick... but you need to explain what is the raycast's purpose. Do you want the ray to only shoot out a certain distance from the player's +Z axis or do you want to always check to see if anything is blocking the ray between the player and the wall? If you are just performing a world pick from the player to the wall, I am not sure what exactly you are trying to accomplish as it will always return true.
-
Assuming the raycast is not hitting the player, you are performing a World:Pick() which always does the raycast between two defined points in space. So you clicking anywhere with the mouse has no bearing on the points used in the your code (other than causing the pick to occur). A Camera:Pick() uses screen coordinates and you can use the mouse position to determine those but typically you are using a first/third person view with the player. You could just put a defined second position away from the player to see if the world pick intersects with anything, but it really depends on what your goal is with performing a raycast.
-
http://www.leadwerks.com/werkspace/page/api-reference/_/transform/transformpoint-r543 window = Window:Create() context = Context:Create(window) world = World:Create() camera = Camera:Create() camera:Move(0,2,6) light = DirectionalLight:Create() light:SetRotation(35,35,0) model = Model:Box() model:SetColor(0.0,0.0,1.0) model:SetPosition(0,2,9) model:SetRotation(45,45,0) surface = model:GetSurface(0) marker = Model:Box() marker:SetScale(.05,.05,.05) marker:SetColor(1,0,0,1) while window:KeyDown(Key.Escape)==false do if window:Closed() then break end model:Turn(0,-0.2,0.5) localpos = surface:GetVertexPosition(0) globalpos = Transform:Point(localpos,model,nil) screenpos = camera:Project(globalpos) marker:SetPosition(globalpos) Time:Update() world:Update() world:Render() context:SetBlendMode(Blend.Alpha) context:DrawText("Local Vertex Position: "..localpos:ToString(),2,2) context:DrawText("Global Vertex Position: "..globalpos:ToString(),2,22) context:DrawText("Vert0",screenpos.x,screenpos.y) context:SetBlendMode(Blend.Solid) context:Sync(true) end
-
The Leadwerks Editor's default grid dimensions are in centimeters. "The Leadwerks Engine uses a scale of one unit space = one meter. Therefore, a centimeter is 0.01 units, a millimeter is 0.001 units, and so forth." Engine commands that require distance or position values are in meters.
-
It appears the model is huge and its origin is not on the model itself but far away. Suggest placing the origin at the corner of the model and scale down the model before exporting. Also, this model does not have the UVs properly mapped (actually appears there are no UVs at all). As a reference, one square in the grid is 100x100 meters.
-
Animation won't export/import from Blender
macklebee replied to Wolfsong's topic in General Discussion
Without you posting the model in question, all we can do is guess at the problem. Does the model editor show that there is an animation? Does the animation play in the model editor? -
Forum Attachment Bug During EDIT
macklebee replied to macklebee's topic in Leadwerks Engine Bug Reports
-
Forum Attachment Bug During EDIT
macklebee replied to macklebee's topic in Leadwerks Engine Bug Reports
-
Forum Attachment Bug During EDIT
macklebee replied to macklebee's topic in Leadwerks Engine Bug Reports
I am doing this in Chrome. Ok - it works when the item is attached in the original post but if you edit and then add an attachment it gives that error. Edit the post by deleting your attachment, re-attach it to the post, and then resubmit. -
Whenever an item is Attached to a post, it will cause an error to be shown once the post is submitted. Warning: Illegal string offset 'edit_post' in /home/leadwerk/public_html/werkspace/admin/applications/forums/sources/classes/post/classPost.php on line 2214 It still attaches the item if you click back to your Leadwerks page
-
At this point, you need to attach an example fbx model or we will just keep guessing at what the problem could be.
-
Interesting. It appears to be just Titlebar at least in Leadwerks apps. On my test just now, if the LE game is windowed and borderless, then it doesn't appear to pause. If it has a Titlebar, it pauses every time.