Jump to content

Genebris

Members
  • Posts

    517
  • Joined

  • Last visited

Everything posted by Genebris

  1. Yes, we found that in another thread http://www.leadwerks.com/werkspace/topic/15068-how-to-change-the-size-of-the-texture-resolution/ I guess this is correct behavior, you can just hide that model anyway.
  2. Just a small teaser to keep you motivated http://www.youtube.com/watch?v=IMuqoCDb8dk
  3. This is the correct way. You check for key exactly one time every update and only then check other conditions. If this is not working then the mistake is in other part of your code which we don't see. Maybe you don't check for trigger collision if key isn't hit? Those two checks should be independent. If you need to flush one key you just get it's state: window:KeyHit(Key.H) H key is flushed until next update.
  4. It does for me, your mistake is somewhere else.
  5. Just do this local hHit = window:KeyHit(Key.H) if self.player_Inside_Room and hHit then System:Print("Yay!") end
  6. Just make sure you check for key press every update and use this information only when needed. Don't put it inside other if statement.
  7. Default Leadwerks project has Steamworks included and overlay enabled.
  8. http://www.leadwerks.com/werkspace/page/tutorials/_/terrain-r9#section6
  9. It's in Prefabs\Player if you created a project with FPS template. http://www.leadwerks.com/werkspace/page/tutorials/_/project-manager-r31#section1
  10. GitLab is better by the way, it offers 10 GB, not 2 like Bitbucket.
  11. You can use it anywhere, it's just that main.lua is launched when you launch the game. Also, tutorials mention this.
  12. All examples in API reference are only to demonstrate particular method. Replace your main.lua with it to test.
  13. It's in the sprite tab right after physics and script.
  14. I guess you need to use cutout shader.
  15. It's Sprite and it can be set to billboard mode. It's in Effects list in object creation window. http://www.leadwerks.com/werkspace/page/api-reference/_/sprite/spritesetviewmode-r832
  16. You just need joint class. http://www.leadwerks.com/werkspace/page/api-reference/_/joint/jointhinge-r735 http://www.leadwerks.com/werkspace/page/api-reference/_/joint/jointsetangle-r799
  17. You need to create geometry yourself, maybe with curves in Blender if you want curved roads.
  18. Upload your build so I can try if it fails for me.
  19. OK, it turned out that there are two problems with this: 1. There has to be a model on a scene with a material that uses your target texture otherwise it won't update and only the first frame will be rendered in it. 2. If you have only one camera, texture anyway stops updating after resize. You need to have a second camera that renders on screen normally, then it will work. My code: function Script:Start () self.tex = Texture:Create(512,512) self.cam=tolua.cast(self.entity, "Camera") self.cam:SetRenderTarget(self.tex) self.mat=Material:Create() self.mat:SetTexture(self.tex) self.mat:SetShader("Shaders/Model/Diffuse.shader") self.mdl = Model:Create() self.mdl:AddSurface() self.mdl:SetMaterial(self.mat) end function Script:UpdateWorld() if Window:GetCurrent():KeyHit(Key.A) then self.tex = Texture:Create(256,256) self.cam:SetRenderTarget(self.tex) self.mat:SetTexture(self.tex) end end function Script:PostRender() Context:GetCurrent():DrawImage(self.tex,0,0) end This is a script on first camera and there is a second camera that renders normally. This way everything works as expected. But if I delete the second camera, target texture stops updating and image on the screen freezes. Any idea what's wrong?
  20. You can render second camera into texture and draw this texture on the screen. http://www.leadwerks.com/werkspace/page/api-reference/_/camera/camerasetrendertarget-r901
  21. I think that kind of things shouldn't be rendered at runtime, I imagine a proper way would be to make a script for blender that will run through all your fbx files, render them and save a texture with the same name.
  22. Do four threads require CPU with 4 cores?
  23. Apply all modifiers before exporting, try to export through leadwerks exporter and through default fbx exporter, upload blender project here.
×
×
  • Create New...