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.

You are viewing a single thread.
View all comments View context
1 point

Well yeah physically its sort of right, but for one (though im not sure if this is just a difference of opinion or if its not clear from the picture) imo the streched hole does seem abnormally large. But also if i use any decal more complicated than just this black circle it would seem off. Since the bullet hole texture would be modeled off a “clean” 90 degree impact bullet hole it would look off if streched like that.

Here a simple example that makes it a bit more clear where i put a white x inside the bullet hole.

Decals that make sense for (near) 90 degree impacts would look bad (or at least very different) when stretched like this.

permalink
report
parent
reply
1 point

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.

permalink
report
parent
reply

Godot

!godot@programming.dev

Create post

Welcome to the programming.dev Godot community!

This is a place where you can discuss about anything relating to the Godot game engine. Feel free to ask questions, post tutorials, show off your godot game, etc.

Make sure to follow the Godot CoC while chatting

We have a matrix room that can be used for chatting with other members of the community here

Links

Other Communities

Rules

  • Posts need to be in english
  • Posts with explicit content must be tagged with nsfw
  • We do not condone harassment inside the community as well as trolling or equivalent behaviour
  • Do not post illegal materials or post things encouraging actions such as pirating games

We have a four strike system in this community where you get warned the first time you break a rule, then given a week ban, then given a year ban, then a permanent ban. Certain actions may bypass this and go straight to permanent ban if severe enough and done with malicious intent

Wormhole

!roguelikedev@programming.dev

Credits

  • The icon is a modified version of the official godot engine logo (changing the colors to a gradient and black background)
  • The banner is from Godot Design

Community stats

  • 1K

    Monthly active users

  • 669

    Posts

  • 2.5K

    Comments