Hello!
I am looking for an advice on how to implement tank armor thickness per impact point.
Basically I’d like to have low-poly body responsible for projectile interaction.
Each face of a body has armor thickness assigned to it. When a projectile hits a face, I’ll calculate penetration based on impact angle and armor thickness.
I came up with two approaches, but I couldn’t complete any of them.
-
Hit Result - Face Index. The idea here is to have a
TMap<int32, float>
where each face has thickness assigned to it. The problem is map initialization. I’ll probably need to write custom FBX parser to get list of triangles and color assigned to them. Is there an easier way to assign color/float to a face? -
Find Collision UV
The problem here is that I couldn’t find how to get pixel color using these UVs. Also it looks like a costly operation if it has to be enabled on project level.
(I’m doing extra line trace from slightly above collision point to slightly below it, because original hit result doesn’t return face index or UVs)
Thank you!