Jump to content

SlipperyBrick

Developers
  • Posts

    543
  • Joined

  • Last visited

Everything posted by SlipperyBrick

  1. Any answer to this guys? I've tried to Google some tutorials but didn't really find much in regards to video's or answers. I'm not to sure how the Joint class works. Would it need to be attached to a pivot and that pivot parented to the object that is going to act as the rotation point? This seems the most logical answer yet when I actually try it, it doesn't do anything lol. I'm not to sure if I need to change anything in the FPSPlayer.lua to get this to work though. There already is a method in FPSPlayer.lua for using item's/picking up items, that is binded to the E key but this doesn't seem to do anything either.
  2. I'll have to check that out. I tried using the Hinge.lua script last night but couldn't figure out how to get it to work. I have a pivot as a parent to the object I want the rotation to work with and I put the Hinge.lua script to that pivot. Not to sure if that's how it works. I'll look in to the Joint class too, I am using the FPSPlayer script for my character at the moment. I need to go through the script to see how the use function works and to check what else is in the script. I did try starting my own FPSPlayer script but it just seemed a bit to much work considering there is already one available lol
  3. Hi Guys, I am wanting to program some door physics in the same style as how the doors work in the game Amnesia. For those who haven't played Amnesia: The Dark Descent you click and hold on a door and then drag in a certain direction to open it, releasing the mouse at the peak of the drag. The speed of the drag defines how far the door will open in combination with how fast you dragged and when you left the mouse click go. How would I start something like this and is it even possible in Leadwerks? To start off simple, how would I even get an object to rotate at a certain point, could I attach a pivot to the object in question in the precise location I want my rotation origin and then have my door.lua or whatever attached to that pivot? It would be awesome to adapt on the script so you can put a file path for an object rather than doing this with something like a prefab.
  4. I have a whole house level mapped out in Leadwerks and I was wondering, for the Environment Probe's could I get away with having one probe encompass my whole level? Or should I have a probe for each room scaled to fit that room from wall to wall and floor to ceiling? My level is pretty big it's a full house with 4 floors (basement, first floor, second floor and attic). Would one probe not be enough and would a probe per room be too much?
  5. Just a suggestion that isn't really that important but it would really help in regards to modelling. Can the units in Leadwerks be changed to something more real world? 1 game unit = 1cm. This would make it so easy to model or even use CSG to make game levels. Even adding the ability to change Leadwerks units would be awesome.
  6. All fixed. I was setting my camera rotation for X axis after the clamping
  7. Ah perfect, thanks macklebee! Is there a way to stop it from getting all jittery? When I drag my mouse down it hits the value I've put for the clamp but if I continue to drag down the screen goes all jittery, like it's fighting against my mouse to not go past the value I've put in to clamp the camera.
  8. I have a custom character controller script and I want to clamp the Y axis for my character controller. Right now I can move my mouse down on the Y axis and the camera will let me go completely around on the Y axis, I need to clamp the camera movement to a certain angle. --[[ ***LEADWERKS MEASUREMENTS*** Corridor Width = 256cm Wall Height (Standard) = 320cm Wall Height (Lowest) = 288cm Doorway Width = 128cm Doorway Height = 256cm Wall Thickness (Doorways) = 32cm ]]-- function Script:Start() local window = Window:GetCurrent() --self.camera = players camera --self.entity = temporary box to use for player movement --creates a camera in the scene and parents to the entity self.camera = Camera:Create(self.entity) --sets the type of the object to player self.entity:SetKeyValue("type", "player") local mass = self.entity:GetMass() if self.entity:GetMass() == 0 then Debug:Error("Player mass should be greater than 0.") end --gets the entity position local entpos = self.entity:GetPosition(true) --sets the camera height self.camera:SetPosition(entpos.x, entpos.y + 1.9, entpos.z, true) --sets the camera rotation variable self.camrotation = self.entity:GetRotation(true) self.camera:SetRotation(self.camrotation.x, self.camrotation.y, 0, true) mousex = Math:Round(window:GetWidth()/2) mousey = Math:Round(window:GetHeight()/2) --sets the camera post processing effects self.camera:SetFOV(70) self.camera:AddPostEffect("Shaders/PostEffects/ssao.lua") self.camera:SetMultisampleMode(4) end function Script:UpdateWorld() local window = Window:GetCurrent() --gets the position of the mouse local mouseposition = window:GetMousePosition() window:SetMousePosition(mousex, mousey) local dx = mouseposition.x - mousex local dy = mouseposition.y - mousey self.camrotation.x = self.camrotation.x + dy / 10 self.camrotation.y = self.camrotation.y + dx / 10 self.camera:SetRotation(self.camrotation.x, self.camrotation.y, 0, true) end function Script:UpdatePhysics() local window = Window:GetCurrent() --xmove = left/right speed --zmove = forward/backwards speed local xmove = 0 local zmove = 0 --key bindings for movement if window:KeyDown(Key.W) then zmove = 1 end if window:KeyDown(Key.S) then zmove = -1 end if window:KeyDown(Key.A) then xmove = -1 end if window:KeyDown(Key.D) then xmove = 1 end self.entity:SetInput(self.camera:GetRotation(true).y, zmove, xmove) end Here is the script at the moment. Any help is appreciated.
  9. Sorry just read the API reference and the last parameter 'windowstyle' needs to be set to 'window.Fullscreen'.
  10. How can I set my game to full screen in my Main.lua? --create a window local windowstyle = window.Titlebar if System:GetProperty("fullscreen") == "1" then windowstyle = windowstyle + window.FullScreen end window = Window:Create(title, 0, 0, System:GetProperty("screenwidth", "1600"), System:GetProperty("screenheight", "900"), windowstyle) window:HideMouse() Right now I am setting it to my monitors resolution but it still has the border and it isn't exactly fullscreen.
  11. Hi, I would like to know if it is possible to change the shadow resolution in Lua. Or is this something that can only be done through C++? My SetLightQuality() is at 2 which I believe is the maximum.
  12. Overlapping brushes didn't seem to work. I'm not to sure whether this is Leadwerks doing some sort of shadow LOD work. I can't seem to find any other options for shadow quality. Setting the view range on lights to infinite doesn't seem to work either.
  13. Just a small suggestion here. When selecting an object in the scene tab, within the general tab of that object I think it would be great to have the rotation and position boxes have labels for which axis they affect. This may not be worth doing but would be nice to see as I can never remember which one is which. If anyone thinks this is stupid then I am sorry lol.
  14. Awesome I will give this a try later today. Thanks man!
  15. Haha! I have increased the lighting quality in my Main.lua. When I move away from the edge it gets bigger, like its spreading and the shadow slowly disappears. I have a directional light in there and a point light. I also have the ssao.lua in my post process stack. When I start to move closer to the edge the 'artifact' disappears and the shadow shows up. Its almost like some sort of LOD effect where far away the shadow doesn't render then the closer you get it shows up with good quality.
  16. I was wondering if this can be fixed without having to change or amend anything in C++ I've set my lighting quality to 2 but have had no change. When I go a little far away from objects that are receiving shadows the shadow seems to have some sort of falloff. Here is an image to show you what I mean, you can see where my mouse cursor is the top of the wall the shadow is disappearing. I am wondering if there is anything I can change in my project to stop this from happening, or if there is some values I can change to makes this effect not so prominent?
  17. If those aren't moving objects I would set your light to Static only. Also you can adjust your light quality within your app.lua. I'm not to sure if this has changed but the command SetLightQuality(2) should help.
  18. There is a lot of stuff out there for lua. You can learn the concept/principles of programming with lua and just apply that using the Leadwerks API. Here is some links! https://www.lua.org/pil/1.html http://www.tutorialspoint.com/lua/ Those were the first 2 links that came up when doing a quick Google search ;D
  19. Hi Guys, I am trying out the new Environment Probes but I am getting some issues. My material seems to look incredibly shiney when I place an Environment Probe into my scene. The bounding box for the Environment Probe is wall to wall and floor to ceiling just on the interior faces of the walls. Here is a shot without the Environment Probe, the material looks much less shiny, it behaves as I intended. I'm not to sure what the problem is. I thought the new Environment Probes were just for Global Illumination and not reflections, which is what it seems to be doing. Am I going wrong somewhere? Thanks
  20. Things are kicking up a notch here, I love it! The new screens showing the GI and reflections look awesome! Fingers crossed for PBR, Leadwerks will be number one when that comes
  21. You have some metal panels in there so you could put to use shadmars new shader that mimics pbr in combination with cubemaps and lightprobes to get more reflectance. Might need to tweak your materials to make it look good. Also your lighting is a bit to bright, as the other guys mentioned lower your ambient lighting. Also look in to emissive textures, sci fi scenes use them a lot to get cool lighting effects on wall panels and stuff and remove the directional light in your scene.
  22. Ooooooo! Shiz just got real. Damn those are some super sexy screenies!
  23. Mmmm Substance support
  24. I'm wishing for splines it would be awesome to be able to do roads as well as rivers, corridors, fences. Anything that would follow a curve.
  25. I agree with that. I think the headbobbing mechanic may need to be something that is coded into my Player script rather than something that has been baked in to my animations. @macklebee. Math:Min and Math:Max works great by the way. I need to tweak some stuff in the script to make mouse movement a little more smoother because when the mouse hits the angles I've coded in to the min and max functions the camera starts getting a bit jerky when you continue to move the mouse up or down. Best way I can describe it is it's like a shaky kind of effect when you try to go past those angles I've coded in the script.
×
×
  • Create New...