-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New surface material footstep system crashes on collisions with ArrayMesh #65
Comments
I'll look at this ASAP. I love Qodot myself and intend to use it later. An array mesh is something I had not considered. I'm at work so can't look at the code right now. For now if you just return null on that line it will probably prevent that crash so you can work on your Qodot maps. It will stop the system from working properly with the material dictionary though. Also, regarding Qodot, what are your thoughts on how to support footstep materials through Trenchbroom? |
All good, no rush, I took a look at the system a bit when i got the crash. Looks like a cool way of implementing it.
This really shouldn't be too much of an issue, as if you add a .tres with the same name as the texture that trenchbroom uses, it will automatically replace the texture with the material when the map is built in godot. Add said material into the step system and it should work fine. |
You're definitely right this is due to an array mesh. I'm able to prevent the crash and tell when it is an array mesh with the following: No idea how to get the right materials from an array mesh yet though. I can get some information about the first surface, like for example the name of it. I'm not sure how I'm going to find the right surface out of all the surfaces in the ArrayMesh. |
I'm not sure that getting the right material is going to be possible. Currently, I'm just getting the first material I can find from a collider. This works fine for small models, but when the entire map is one static body this poses a problem. Since I am relying on collision data, what I am getting back is the static body. From there I find the array mesh. The trouble is polling an array mesh to find out what surface would be at the collision location and its material. This is beyond my expertise and I'm not sure that its possible. I don't really know how to go about trying to solve it. I can provide an update to fix the crash and just play a generic sound instead for now. |
I see, that stinks because i really liked the simplicity of it. I don't know if this would be helpful or not, as its kind of older but he states that it takes into account models with multiple materials so I don't know if this would work or not, but the code is way over my head so I figured I might just link it to you and see what you think. Whether it helps or not, thank you for making the bypass. |
I'll def take a look, and I will do some more digging into docs to find some kind of alternative at least. I'm determined to use Trenchbroom |
I got to look at the video now. It looks like it might work, I'll definitely dive deeper into the technique he used and try it out. It's gonna take a bit of time for me to really dive in though. It's a very busy week for me and next week I'll be away on a trip. |
All good man, love to find out if it works but I'm in no rush, busy here too. |
I use qodot for my level building which uses an ArrayMesh for every level build. The second I try to move it causes a crash with the new system. I noticed it works fine on the demo scene so I'm assuming based on the information that it is only looking for normal MeshInstances.
The text was updated successfully, but these errors were encountered: