-
Posts
127 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by T0X1N
-
Does anybody know of a way (if you even can) cap the frame rate in Leadwerks besides of just using VSync? Thanks!
- 3 replies
-
- frame rate
- capping framerate
-
(and 1 more)
Tagged with:
-
Leadwerks Summer Games Tournament 2016
T0X1N commented on Admin's blog entry in Ultra Software Company Blog
Are we able to continue developing an existing project and release the updated content before the deadline as our entry or are only new games allowed as entries? -
The problem with that is you will not have any shadows. You would have lights in that world, but there would not be anything that would cast a shadow on to the gun.
-
One way off the top of my head, which can be buggy, is to turn off the Depth Test in the guns material settings, I believe, but the only downside to that is your weapon cannot have child entities, only 1 entity. If it does, then the entities behind each other will appear. It would look like your camera has X-Ray vision. Since I never tested this route, I could be wrong on this one. Another way is to, like Josh said, scale the gun so small and position the weapon model really close to the camera so that it will not clip through anything. However, shadows will not appear on the gun model correctly because the model is so small. This will become more apparent when you have longer weapons like a rifle or shotgun. Another way, which is more realistic, is to have the weapon normal size, but perform a raycast so that if the weapon comes close to a surface, perform an animation that it will bring up the weapon so it does not go through the surface. One game that did this was Call of Juarez: Bound in Blood. I think Crysis did this as well.
-
(C++) Camera::Project - Weird Results When Looking Away From Project Point
T0X1N replied to T0X1N's topic in Programming
Thanks for replying Evayr! That issue would be easy to solve since if the camera is not looking at the point, it would return a -Z value, so I would just stop drawing it if it was just one point. However, the problem here is I want to draw a line of two points. If one point goes off camera, I have want to keep drawing the line, same would be if both points are off screen, but I am looking at the path. Like I said in my previous post, I think the problem is that when the Z axis goes negative, the X & Y coordinates are mirrored on the screen. I just need to mirror them back and BINGO! I should have it fixed. I'll keep working at this and see if I can fix it. If anybody has a solution before me, please chime in!- 4 replies
-
- Camera::Project
- Camera-Project
-
(and 1 more)
Tagged with:
-
(C++) Camera::Project - Weird Results When Looking Away From Project Point
T0X1N replied to T0X1N's topic in Programming
Thanks for the reply, Maryj. Odd thing is it does not matter what p1 nor what p2 is on the 3D space. I tried p1 as a 3D point on the grid (-10 Z units away from p2) and used Camera::Project to grab the 2D coordinates so I can draw the line, but same issue. I think I know what the issue is, but I don't know the solution. I have the scene setup that you can fly the camera around using WASD and mouse to look. If one of the 3D points, of which I am using Camera::Project to get 2D coordinates to draw the line, go behind the camera, the Camera::Project basically returns a mirrored value and a negative Z axis. I am no math guru and I don't know of a formula to mirror those values back to where they should be so the program can draw the line correctly. The end goal here is to draw a 2D grid in the 3D space, just like how the Leadwerks Editor has. I could use a large 3d plane with a grid texture to make the grid, but I would rather do it with 2D lines so I don't use any polygons nor material loaded in memory to draw it.- 4 replies
-
- Camera::Project
- Camera-Project
-
(and 1 more)
Tagged with:
-
I am trying to use Camera::Project and Context::DrawLine to draw a 2d grid in 3d space for an map editor I am working on, but if 1 of the points go behind the camera, the grid gets goofy and is not drawing the line to connect to where it should in 3D space. Is this a bug or am I doing something wrong? I see that the "Z" axis goes to a negative number when the point is behind the camera, but I don't understand why the X & Y axis go way out of what they are supposed to be nor how to get them to what they are supposed to be. I have written a simple code snippet that does the same issue: Vec3 p1 = Vec3(context->GetWidth()/2, context->GetHeight()/2, 0); Vec3 p2 = camera->Project(Vec3(0, 0, 10)); context->DrawLine(p1.x, p1.y, p2.x, p2.y); Here is a screenshot of what I am experiencing with the code above:
- 4 replies
-
- Camera::Project
- Camera-Project
-
(and 1 more)
Tagged with:
-
Nevermind... I just figured it out. Not sure why it was not working before. The solution is: (Model*)entity->GetParent(); or (Model*)entity->GetChild(childnumber);
-
Does anybody know of a way to get the model class from an Entity class? I want to get the model from the parent entity of the surface I picked in my program, but with the GetParent() function, it returns Entity, but I want the Model class so I can edit it's geometry. I also would like to do the same would for GetChild().
-
Forgot to post here. My team's game entry is uploaded here: http://www.leadwerks.com/werkspace/page/games/_/the-adventures-of-relic-rick-public-alpha-v100-r108
-
Can't Change Material to CSG Brushes During Game Loop
T0X1N replied to T0X1N's topic in General Discussion
I did not think of just changing the texture of the material. Nice! Thanks, Josh! I will do that then! -
The collision type ("collisiontype") in the Pick function is the 7th parameter. The default is set to pick all objects. You would set the "collisiontype" parameter to something that does not pick the terrain. bool Pick(const Vec3& p0, const Vec3& p1, Pick& pick, float radius = 0.0, bool closest=false, bool recursive=false, int collisiontype=0) http://www.leadwerks.com/werkspace/page/api-reference/_/command-reference/collision-r778 Unfortunately, I am not sure what collision type is set for terrain as I have not worked with terrain much.
-
Cannot Delete Models Selected with Shift-Click-Drag Selection Method
T0X1N replied to T0X1N's topic in General Discussion
Sorry, I forgot to mention I am using the Windows beta build as well. I just edited my post. I think I may have found the problem. I have a model loaded with a "collisionhull" child for custom collision shape. So the model is loaded as the following: Parent: 1. visual mesh 2. "collisionhull". When I use the selection marquee to select the object, it only selects the visual mesh child and not the "collisionhull" child nor the parent. When it does this, I cannot delete since the model is not really selected, only the visual mesh child. When I use the CTRL-Click method, it selects all within that model then allows me to delete.- 3 replies
-
- 1
-
- click-drag selection
- selection marquee
-
(and 1 more)
Tagged with:
-
When I use the Shift-Click-Drag selection box (or selection marquee) over models in the grid view, then try to delete those models selected (not CSG), they will not delete. I can only delete them when I click on the models individually while holding CTRL then delete them. I found this bug is only for models. The selection marquee method then deletion will work for CSG objects. Using Windows Beta Build.
- 3 replies
-
- click-drag selection
- selection marquee
-
(and 1 more)
Tagged with:
-
Just saw a typo: "...end Sunday, February 18th...", February 18th is on a Thursday.
-
Just tested out the fix in the Beta build. Loads fine now on my end! Thanks Josh!
-
I would like to have a feature that if you right click on an entity in either the grid or perspective view then click on "Frame Selection" not only would it go to the entity on all viewports, but also auto-scrolls the scene tree to the selection. Or maybe have a separate selection in the menu for "Go To In Scene Tree". This would be very handy to have when inspecting the entity (children and/or parents) or wanting to add it to the Flowgraph Editor.
-
- 5
-
- scroll to entity
- scenetree
-
(and 1 more)
Tagged with:
-
Same issue here. Using the beta, the editor will not load up. It will stay on the splash screen with no progress in the progress bar. Just opted out of the beta and the editor loads up fine.
-
Ha ha! I don't mind at all, in fact, I feel honored!
-
Nice! I may participate! Ha ha! That's the photo of me wearing the Leadwerks T-shirt I posted on twitter ( )! Glad you are putting it to good use! I feel honored!
-
Can't Change Material to CSG Brushes During Game Loop
T0X1N replied to T0X1N's topic in General Discussion
Thanks Reepblu! I checked it out and the shader does work for CSG objects. Although, I was hoping that I could get my LUA script to work with CSG objects. It would give me a lot more control over UVs on each face of the brush as the shader does not allow you to adjust the UVs also the LUA script would be alot easier for me as I don't know how to code in GLSL. -
I wrote a LUA script to setup frame by frame animation, but if I try to change the material for a CSG brush during the game loop, it will not appear on the object in the game. I applied the same script I wrote to a sprite object and a cube model I exported from Blender and the material for each changed just fine during the loop. Am I doing something wrong for CSG brushes or is this a bug? Thanks! Here is the script I wrote for testing purposes: Script.speed = 10.0 -- float "Animation Speed" Script.material1 = "" --path "Material (Frame 1)" "Material File (*mat):mat|Material" Script.material2 = "" --path "Material (Frame 2)" "Material File (*mat):mat|Material" Script.material3 = "" --path "Material (Frame 3)" "Material File (*mat):mat|Material" Script.material4 = "" --path "Material (Frame 4)" "Material File (*mat):mat|Material" Script.material5 = "" --path "Material (Frame 5)" "Material File (*mat):mat|Material" Script.frames = 0 Script.currTime = 0.0 Script.currFrame = 0; Script.mat1 = nil; Script.mat2 = nil; Script.mat3 = nil; Script.mat4 = nil; Script.mat5 = nil; function Script:Start() if(self.material1 ~= "") then self.frames = self.frames + 1; self.mat1 = Material:Load(self.material1); end; if(self.material2 ~= "") then self.frames = self.frames + 1; self.mat2 = Material:Load(self.material2); end; if(self.material3 ~= "") then self.frames = self.frames + 1; self.mat3 = Material:Load(self.material3); end; if(self.material4 ~= "") then self.frames = self.frames + 1; self.mat4 = Material:Load(self.material4; end; if(self.material5 ~= "") then self.frames = self.frames + 1; self.mat5 = Material:Load(self.material5); end; end function Script:UpdateWorld() if(self.currTime >= self.speed) then self.entity:SetMaterial(self.mat2) self.currFrame = self.currFrame + 1; if( self.currFrame > self.frames ) then self.currFrame = 1 end if( self.currFrame == 1 ) then self.entity:SetMaterial(self.mat1) end if( self.currFrame == 2 ) then self.entity:SetMaterial(self.mat2) end if( self.currFrame == 3 ) then self.entity:SetMaterial(self.mat3) end if( self.currFrame == 4 ) then self.entity:SetMaterial(self.mat4) end if( self.currFrame == 5 ) then self.entity:SetMaterial(self.mat5) end self.currTime = 0; else self.currTime = self.currTime + Time:GetSpeed(); end end
-
Sprites Not Receiving Lights Correctly
T0X1N replied to T0X1N's topic in Leadwerks Engine Bug Reports
Ah, gotcha. I am developing a retro-styled 3D first person game using sprites for props/objects and enemies that will also use the lighting system. Any chance this will be fixed soon? Thanks! -
I am using the Beta and I noticed that sprites are not receiving light sources correctly. Put a point light in the scene and put a sprite near the light. Orbit the camera and you will notice that the sprite is lit when it is facing away from the light source. If it faces the light source, it becomes unlit. This also happens if you use a directional light and spotlight. See the screenshots below:
-
Having a key shortcut to Group and Ungroup selected CSG brushes and/or models in the editor would be a very useful feature to have. This would reduce the time spent selecting brushes that I am constantly tweaking and/or moving around especially when the map becomes more and more populated with entities. The possible key combinations would be CTRL+G for Group selected objects and CTRL+SHIFT+G to Ungroup selected group.
- 5 replies
-
- 7
-
- csg brush grouping
- entity grouping
- (and 4 more)