-
Posts
314 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by Brutile
-
-
Really? O.o
I'll have to try it out.
Thanks!
-
I suspect this is to do with engine optimizations.
Entities in your scene have a view distance setting, so maybe try to increase this to infinite on some of your walls and floor and see if that makes a difference.
And also increase it on your light.
Actually, more likely to be the case is the shadow draw distance. The darkness is simply a shadow cast on your room, so the shadows will only appear at a certain distance.
Increasing the Light Quality will likely solve this issue.
-
What graphics card, if any, do you have on your old computer?
-
Which brings up another question.
When I delete the light, it's not completely dark inside. I can still see.
This is your ambient light. Change the color from the root properties of your scene.
-
I'm sure this would have been asked before, but can we have the ability to edit prefab properties without having to drag it into the scene, then save over the original?
- 1
-
So, I am getting confused when you say to "add the exe with your game and install it separately"?
- Does that mean that I burn the oalinst.exe file on the same disk that I burn the game files to?
- Then, I am assuming that I install the oalinst.exe file first and then run the game.exe file, right?
I meant that you would include the OpenAL installer when you give someone your game. It doesn't have to be on the same disk, but it would need to be installed one way or another. I'm sure there are ways to get it to install OpenAL when your game installer runs, but I don't know how to do such a thing.
I tried running the oalinst.exe on a computer but that didn't seem to do anything. I got an error that said something about Win32?
Try using the installer from the OpenAL website
-
You have to manually install OpenAL for some reason.
There was a previous post that said you can get the install exe from C:\Program Files (x86)\Steam\steamapps\common\Leadwerks Game Engine\_CommonRedist\OpenAL\2.0.7.0\oalinst.exe
The version (2.0.7.0) might be different. Add the exe with your game and install it separately.
I'm pretty sure you can also download it from https://www.openal.org/downloads/
-
The collisiontype refers to Collision types. So for example, if you use Collision.Scene, it will pick everything except Scene. Collision.Debris will only pick Scene and Prop, etc.
-
Need your help in testing. I want to make sure that not only works for me.
2D Engine.exe - System Error
The program can't start because MSVCP140.dll is missing from your computer. Try reinstalling the program to fix this problem.
-
One sprite 6 vertex 2 triangle.
Shouldn't it be 4 vertex 2 triangle? You would re-use a couple of vertices.
Looks good btw!
I'll give it a test
-
I figured it out, but it's quite slow.
local hitPos = pickInfo.position local surface = pickInfo.surface local canPlace = true for v1 = 0, surface:CountVertices() - 1 do local vertPos1 = surface:GetVertexPosition(v1) for v2 = 0, surface:CountVertices() - 1 do if v1 ~= v2 then local vertPos2 = surface:GetVertexPosition(v2) if (vertPos1.x == vertPos2.x and vertPos1.y == vertPos2.y) or (vertPos1.x == vertPos2.x and vertPos1.z == vertPos2.z) or (vertPos1.y == vertPos2.y and vertPos1.z == vertPos2.z) then local closestPoint = self:ClosestPointOnLine(vertPos1, vertPos2, hitPos) if hitPos:DistanceToPoint(closestPoint) < (0.96 / 2) then canPlace = false end end end end end if canPlace == true then local bulletDecal = Decal:Create(self.bulletDecalMaterial) bulletDecal:SetPosition(pickInfo.position, true) bulletDecal:AlignToVector(pickInfo.normal * -1) bulletDecal:SetScale(Vec3(0.1, 0.1, 1)) bulletDecal:SetParent(pickInfo.entity) end
function Script:ClosestPointOnLine(vA, vB, vPoint) local vVector1 = vPoint - vA local vVector2 = (vB - vA):Normalize() local d = vA:DistanceToPoint(vB) local t = vVector2:Dot(vVector1) if t <= 0 then return vA end if t >= d then return vB end local vVector3 = vVector2 * t local vClosestPoint = vA + vVector3 return vClosestPoint end
Edit: This is slow because somehow the vertex count on a CSG cube is 128. WTF?
Edit: It seems like the engine is combining CSG meshes with the same texture to save draw calls. This is causing the above code to be slow. PickInfo.face.surface would solve this issue, but it doesn't seem to work.
- 1
-
I have an idea. I'll put into pseudo code, then I'll try to figure it out in code.
for all connecting vertices,
find the closest point along that line to the hit point.
If the distance between that point and the hit point is < 96 / 2 then don't spawn object.
Edit: We would also need to ignore the line that goes diagonally.
-
Try turning the specularity down
- 1
-
This code will do a basic job of doing what you want, but it has limitations.
local hitPos = pickInfo.position local surface = pickInfo.surface local canPlace = true for v = 0, surface:CountVertices() - 1 do local vertPos = surface:GetVertexPosition(v) if hitPos:DistanceToPoint(vertPos) < (0.96 / 2) then canPlace = false end end print(canPlace)
-
Try creating a new project and follow these steps:
1. Create empty project.
2. Create a floor.
3. Create a box on the foor.
4. Apply the default grass material to both.
5. Set the grass material's diffuse alpha to 0 (the 4th value)
6. Download the SSLR shader.
7. Add the shader to the scene root.
If that doesn't work, then something is wrong, because I did just that and it works fine.
And make sure to pan the camera in different angles, as it's only visible in certain angles.
- 1
-
It worked for me O.o
-
What are the assumptions being made? Are all the surfaces square? Are the surfaces CSG? or does it need to check for any possible surface?
Edit: And what about the model being placed? Is that just a flat plane, or can this be a complex object?
-
Oh, okay. I didn't fully understand what you are doing. So by my understanding, AABB is only calculated if an object is in the world. That's why you're getting 0,0,0; 0,0,0
-
-
You can't expect everything to work out of the box. Some assets require some work to setup for your specific need. And it is a free asset, so don't expect the creator to keep it up to date and provide a detailed documentation. I'm just grateful that they put this out for people to use freely. If this was a paid asset on the other hand, I would expect them to help out.
I'm going to install this shader and try to help you out. I'll do my best to understand it and help you use it.
- 1
-
World pick is a bit different:
Pick(const Vec3& p0, const Vec3& p1, PickInfo& pickinfo, float radius=0.0, bool closest=false, int collisiontype=0)
-
Is this what you're looking for?
http://www.leadwerks.com/werkspace/page/api-reference/_/surface/surfacegetaabb-r235
Or do you want something that finds the area of just certain faces of the mesh
-
If you click the root in your scene panel, you will see some settings. Post processing effects is one of them. This is where you add your effects. As far as I know, you need to add the .lua version of the shader, not the .shader file.
It sounds like there is also a custom shader for the material, but I don't know for sure until I try to use it myself.
-
Leadwerks doesn't use a set FPS value. There is a playback speed when you play the animation, so you can use any.
As for the weapon going through walls, I believe you can fix this by using 2 worlds. One world will have your gun, and the other world will have everything else. I did this in a previous project, but can't remember exactly how I did it. I just know it can be done like this.
Published game will not run on stand-alone computer
in General Discussion
Posted
There's your problem. I tried to run a game on my laptop that had switchable graphics, but it was using integrated instead of dedicated and it wasn't working. Having no graphics card means you can't run your game.