-
Posts
517 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by Genebris
-
-
It's in Prefabs\Player if you created a project with FPS template.
http://www.leadwerks.com/werkspace/page/tutorials/_/project-manager-r31#section1
-
You can use it anywhere, it's just that main.lua is launched when you launch the game. Also, tutorials mention this.
-
It's a lot easier for people like me to be shown what and how to do things than just "here's code go for it"
Like this
http://www.leadwerks.com/werkspace/page/api-reference/_/entity/entitygetgravitymode-r145
It gives you the code says what it dose but doesn't tell you how to use it or where to use it
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.
- 1
-
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 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.
-
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?
- 1
-
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.
-
Apply all modifiers before exporting, try to export through leadwerks exporter and through default fbx exporter, upload blender project here.
-
It simple, just make this script and import this into main.lua at the very beginning:
spellEffects={}
function spellEffects:CastSpell(something)
.
.
.
end
Then you can call spellEffects:CastSpell() anywhere in your game and you don't need multiple scripts or importing.
-
Yes, it's not possible that way. I had the same question here: http://www.leadwerks.com/werkspace/topic/10616-importing-one-script-into-two-different-scripts/
Take a look how default AnimationManager script functions. You can do the same thing.
Or maybe just use global table with all your effects, this will be simpler actually. And you won't need to import any scripts anywhere.
-
There is a pick mode option in the material settings.
- 2
-
There are animated and not animated versions of diffuse+normal shader, you need one from model/animated folder.
-
There are two values at the beginning of the shader, cutoff and overdrive, change them.
- 1
-
math.randomseed(os.time())
- 1
-
I guess you are looking for default Lua math.randomseed() function.
- 1
-
In-engine particles always look ugly, I wanted something prerendered, it's basically the only way.
-
No, I need an animation.
-
Can anyone suggest a good software to render blood sprite sheet like in this demo?
I have tried in Blender, but it's fluid simulation seems so inconvenient. I guess you can't even make it splash without actually dropping something into the water.
Help with prefabs
in General Discussion
Posted