-
Posts
517 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Everything posted by Genebris
-
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.
-
It still causes input lag, so no benefits.
- 3 replies
-
- frame rate
- capping framerate
-
(and 1 more)
Tagged with:
-
Just a small teaser to keep you motivated http://www.youtube.com/watch?v=IMuqoCDb8dk
-
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.
-
It does for me, your mistake is somewhere else.
-
Just do this local hHit = window:KeyHit(Key.H) if self.player_Inside_Room and hHit then System:Print("Yay!") end
-
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.
-
Default Leadwerks project has Steamworks included and overlay enabled.
-
http://www.leadwerks.com/werkspace/page/tutorials/_/terrain-r9#section6
-
It's in Prefabs\Player if you created a project with FPS template. http://www.leadwerks.com/werkspace/page/tutorials/_/project-manager-r31#section1
-
GitLab is better by the way, it offers 10 GB, not 2 like Bitbucket.
-
You can use it anywhere, it's just that main.lua is launched when you launch the game. Also, tutorials mention this.
-
All examples in API reference are only to demonstrate particular method. Replace your main.lua with it to test.
-
It's in the sprite tab right after physics and script.
-
I guess you need to use cutout shader.
-
Steamworks API does that.
-
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
-
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
-
What is the best way to create streets and highways ?
Genebris replied to psygnosys's topic in General Discussion
You need to create geometry yourself, maybe with curves in Blender if you want curved roads. -
Upload your build so I can try if it fails for me.
-
How to change the size of the texture resolution ?
Genebris replied to MartFayer's topic in Programming
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? -
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
-
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.
-
Do four threads require CPU with 4 cores?
-
Apply all modifiers before exporting, try to export through leadwerks exporter and through default fbx exporter, upload blender project here.