-
Posts
517 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by Genebris
-
-
-
Documentation says that hidden entity won't be updated when parent moves, but I tried hiding the bones or entire model and it didn't help whatsoever. Is it correct behavior or a bug? How can I switch from rigged model to non rigged if not by hiding the model with bones?
http://www.leadwerks.com/werkspace/page/api-reference/_/entity/entityhide-r181
-
I'm getting 60 FPS on a decent computer with pretty much empty scene and 30 characters moving on navmesh. I don't think it's a good result. After adding level geometry and lighting it will become 30 if not less.
I can reduce draw distance and shadow distance but it doesn't help, FPS is low even when characters aren't rendered. And this scene is even without animations.
Good idea about switching to non rigged models, I'll try that.
-
I have a huge FPS drop when moving rigged characters with simple Entity:Move method. The same mesh but collapsed in model settings causes no FPS drop.
100 characters on the top have bones. 100 characters on the bottom were collapsed. When moving bottom characters performance stays the same, when moving upper characters FPS drops from 500 to 100.
There is no lighting in the scene and character material uses not animated shader. So I think that the only difference is extra entities that are moving with rigged characters.
code:
function Script:Start()
chars = {}
for i=1,100 do
local e = Model:Load("models/crawler.mdl")
table.insert(chars, e)
e:SetPosition(math.random(0,10),0,math.random(0,10))
end
objects = {}
for i=1,100 do
local e = Model:Load("models/collapsed.mdl")
table.insert(objects, e)
e:SetPosition(math.random(0,10),0,math.random(-10,-20))
end
end
function Script:UpdatePhysics()
if window:KeyDown(Key.E) then
for k,v in pairs(chars) do
v:Move(-0.1,0,0)
end
end
if window:KeyDown(Key.R) then
for k,v in pairs(objects) do
v:Move(-0.1,0,0)
end
end
end
Can Anything be done about it? I don't need 100 characters, but when I tried 30 characters moving on the navmesh performance was very low compared to when they are standing still.
Project if you want to try: https://drive.google.com/open?id=0B5h7P9bq9NmIQmRDdGp1Y29LdFE
-
Obviously spring means summer.
-
You can do this using PhysicsSetPosition to move sword collider.- 2
-
It won't work, unless Josh adds ability to change character collider, you will have to use rigid body for anything like this.
-
For general physics collisions, you could parent a box to a creature. Check out the code examples in the Entity docs, specifically SetShape and SetParent. However, the navigation system will ignore it so you might not get the effect you're hoping for.
You can't attach collider as a child, this will break physics.
-
There is no way to change shape of character controller collider. The only workaround is to use regular rigidbody instead of character controller, but that brings many disadvantages.
-
On CSG brush you need to cast entity to model like you wrote in the first post. Also, CountVertices() on brush causes crash for some reason, CountTriangles works, though.
-
If something doesn't work, you should post error that you get. What you wrote is supposed to work.
-
Yes, it is possible.
- 1
-
-
My main question concerns how I get two games running at the same time? Do I have to export each time and create a standealone?
You don't need to compile your Lua code, you can simply launch your exe file from project folder. I was using google drive to automatically send changes to my second pc.
-
I can't download your archive, reattach it.
-
You can start the game in a small window and put your settings there, no need for C++ for that.
- 1
-
-
What exactly is your problem?
-
You also want hands with animations for it?
-
There is end of "if" statement and there is end of the function.
- 1
-
No, it's Lua and it's easy.
- 1
-
Can't there be an option?
- 2
-
A lot of interesting movement can be done with scale, like monsters with tentacles.
-
Remove the code that is responsible for picking objects up from the player script or increase the weight of the object. Picking up triggers only on light props.
- 1
Hide Terrain by code
in General Discussion
Posted
terrain:Hide() removes collision from terrain, but it remains visible.