Godot Version
4.5
Question
I have a collider shaped like the one in the image (it is actually a proper sphere shape collider but I’m using this mesh because the sphere shape is hard to see on screen), and I’m trying to get every face of every collider that intersects with it. The idea is to use this information to make a locomotion system, which is going to need more than just the information about the ground directly in front of it.
Once I have the mesh faces I will cull them with various different criteria depending on the use-case (walking, climbing, jumping, wall-running, tight-squeezes, etc), but to do that I need a list of faces.
So is there a good way to do this, or a library or addon that can achieve it? I assume it will look something like populating a list of colliders, getting their triangles, then testing them against the volume? This will only be using collider meshes and shapes, so it shouldn’t be too many features to track I wouldn’t think, especially if I’m only doing it for the player controller. I also don’t know if there’s some part of the physics API that I can use to achieve this, since I assume it’s already checking this information somewhere, is it actually creating a list of all collisions between shapes, or does it just stop at the first collision and call it a day?
“No, don’t do that; you’re doing it wrong; do this other thing instead”
A quick aside to pre-empt anybody who wants to say, “No, don’t do that; you’re doing it wrong; do this other thing instead”: I have considered my options, I have considered using a bunch of raycasts, or a capsule collider which already exists, and this is the system I want to try. Maybe it won’t work, but none of us will know that it won’t work until I try it, and to try it, I want to have this information, so thank you for your concern but I won’t be disuaded from this foolish course of action.
