Discriminating material types on collision for choosing appropriate bullet hit effects and footstep sounds #97
Labels
No Label
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
upstream
wontfix
No Milestone
No project
No Assignees
1 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: unfa/liblast#97
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
We need to define a resource type extending Material to add a property carrying information about the type of the surface (glass, wood, metal, flesh, water etc.).
This will allow bullet holes, impact VFX, hit sounds, footstep sounds to match the material type.
https://docs.godotengine.org/en/stable/getting_started/step_by_step/resources.html
https://www.youtube.com/watch?v=sFz0hi_fK5g
I've done this. But it won't work as I expected.
The problem is:
Collision meshes and rendered meshes are completely separate, and there is no way to get material information from that.
In the curent state of Godot the only way to deal with this is to split the level geometry into multiple Static Bodies based on used material types. Then the nodes could contain properties to communicate what kind of material the collision has occured with.
This would either require a lot of manual work or a smart import script.
I think for now we should ignore this issue and wait for possibly a better solution to emerge in Godot.
Related discussion on Godot Contributors chat:
https://chat.godotengine.org/channel/physics?msg=8Sq25knyDdoKRLWzg
Archive copy in case the source goes down:
Create a custom resource type for Materialsto Discriminating material types on collision for choosing appropriate bullet hit effects and footstep sounds