CSandman Posted July 28 Posted July 28 20250728_190219.trim.zip I've attached an MP4 video file of the problem I am having. This occurred in the 0.9.9 version as well as the latest beta build 2894. I created my own map and was trying to play it when the screen would freeze and then the mouse would move outside of the window for awhile. Then it would work for a little bit, but when I try to "fight" a bunch of the mutants it freezes as well. I don't know if the window is losing focus or what. Any help here would be great. I've attached my very early map as well so you can test. I also uploaded a hardware info screenshot. myStart_v7.zip 1 Quote
Josh Posted July 29 Posted July 29 I don't immediately see anything wrong with anything here. I will do more testing... Quote Let's build cool stuff and have fun.
Solution Josh Posted July 29 Solution Posted July 29 The problem is the navigation mesh. You are overloading this system with two things: The default tile resolution is 32 x 32 (1024 voxels). Yours is set to 120 x 120, which is 14 times more. You have many floors stacked up on top of each other, further increasing the cost of calculating each tile by 10x. Shooting a bullet seems to trigger a navmesh rebuild. I can prevent the bullet from triggering a navmesh rebuild by inserting this code around line 130 of bullet.lua: -- Bullet hole decal self.decal:SetPosition(pickinfo.position, true) local scale = self.decal.scale scale = scale / TransformVector(1, 0, 0, nil, pickinfo.entity):Length() if pickinfo.entity:GetMass() > 0 then self.decal:SetParent(pickinfo.entity) end self.decal:SetScale(scale) self.decal:SetHidden(false) self.decal:AlignToVector(pickinfo.normal) self.decal:Turn(0.0, 0.0, Random(360.0)) self.decal:SetNavObstacle(false) Bullet.lua If your navmesh does not rebuild at all and remains static, then it will be okay for this level, but the demands you are putting on it are too much for dynamic navmesh rebuilding. Quote Let's build cool stuff and have fun.
Josh Posted July 29 Posted July 29 I am also adding NavMesh:Staticize to the Lua API. After the next build, you will be able to do this: scene = LoadScene(filename) for n = 1, #scene.navmeshes do scene.navmeshes[n]:Staticize() end This will prevent the navmesh from ever being rebuilt, and is suitable for static scenes. Quote Let's build cool stuff and have fun.
CSandman Posted July 29 Author Posted July 29 Thank you for the help. I'm just starting out with the engine and trying to figure everything out, so that info is useful. Thanks again. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.