So far (outside of somehow adding it into Godot via C++ myself) this doesn’t seem possible but wanted to ask to see if i maybe missed something.

The most i could find was this issue and a couple of related ones.

My specific use case would be for drawing bullet holes onto meshes (via decals). Ideally also being able to determine the texture used on the faces of the meshes that are intersected (to determine an appropriate decal to use).

Having everything that is possible to hit duplicated as a static body or area seems excessive to me. Since the only data required for ray intersection should be the transform of the meshes faces/edges/vertices etc which i would think are already contained in the mesh itself?

Failing being able to make intersecting a ray with meshes work i will probably try experimenting with using areas. They seem the lowest performance cost out of all the options the existing ray cast can detect. I would still end up with most of the games geometry being duplicated though, once as actual meshes and once as collisions for all the areas.

  • Norodix@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Oh yeah, that makes sense. You can try capping the angle between the collision normal and the incoming ray. But it will always be an approximation. I dont think you should get too hung up on it. People always see malformed decals in games. Or footprints on hard surfaces etc. Its not a big deal.