List of triangles contained by bounding box
Posted: Wed Jul 25, 2012 12:57 am
I am trying to add texture decals to my level. Such as the visual blast damage from a grenade, or blood splattered on the ground and up a wall.
I have been looking around for ways to achieve this: one method suggested is to draw a box at the point of impact, found by casting a ray. Then determine the triangles that intersect. Use these triangles to create new geometry. The geometry could be added to for multiple blasts, bullet holes, etc.
Here's some images of what I am on about, taken from this article: http://blog.wolfire.com/2009/06/how-to-project-decals/


I know that the data is contained within the static mesh/group, how would I go about getting this data?
As always, thank you!
I have been looking around for ways to achieve this: one method suggested is to draw a box at the point of impact, found by casting a ray. Then determine the triangles that intersect. Use these triangles to create new geometry. The geometry could be added to for multiple blasts, bullet holes, etc.
Here's some images of what I am on about, taken from this article: http://blog.wolfire.com/2009/06/how-to-project-decals/


I know that the data is contained within the static mesh/group, how would I go about getting this data?
As always, thank you!