Jump to content

Brutile

Members
  • Posts

    314
  • Joined

  • Last visited

Everything posted by Brutile

  1. Not quite. You are sending the input to the character controller, but the character controller is automatically applying gravity and handling the velocity, so if you send 0 for the movement, you will still get gravity being applied. Calling self.entity:SetVelocity(Vec3(0)) should do the trick, but as macklebee said, some physics commands don't work as expected with character physics. If this doesn't work, then you could try applying a very small jump amount to the character controller input. This may work to reset the velocity.
  2. I've had that problem before. It's because your velocity isn't being reset and you're falling too fast and going through the floor. You'll want to set your Velocity to Vec3(0)
  3. I don't think there is any kind of snap feature, but in your case, I would recommend editing the model so that it fits nicely in the grid.
  4. I don't use either of those programs, so I'm not sure.
  5. The first one is tricky, but the second can be done fairly easily. I don't have access to Leadwerks right now, so I can't code anything that works, but I can try to explain it. 1. Get your local forward movement direction, including the y axis 2. Set y to 0 3. Normalize your movement vector 4. Multiply the vector by your movement speed 5. Apply the movement If you don't understand what I'm trying to explain, just let me know and I'll whip up the code in about 8 or so hours.
  6. This may be something to do with the engine optimization. I've noticed that it will combine meshes that have the same material to save draw calls. It probably combines it into another object and hides the original (I'm not 100% on this though)
  7. As far as I know, the size is hard coded, unfortunately. I haven't tried this, but you can try to set your character's physics shape by changing SetShape() using http://www.leadwerks.com/werkspace/page/api-reference/_/shape/shapecylinder-r519
  8. Looks like you haven't unwrapped its UVs
  9. Not by default. You will need to code it manually. You also don't need animations. If you know what you're doing you can code the fire and walking animations and give them some random variation.
  10. The editor uses different settings than your game. You can find the settings by clicking the settings icon at the top, then going into the viewport tab. Try to match those settings in your game.
  11. As far as I know, you just need the installer and the openAL. Just make sure that the judges know that they need to install openAL.
  12. Although, I think if its a gen3 or above, OpenGL4 is supported.
  13. 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.
  14. Really? O.o I'll have to try it out. Thanks!
  15. 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.
  16. What graphics card, if any, do you have on your old computer?
  17. This is your ambient light. Change the color from the root properties of your scene.
  18. 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?
  19. 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. Try using the installer from the OpenAL website
  20. 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/
  21. 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.
  22. 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.
  23. 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
  24. 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.
×
×
  • Create New...