So I'm currently working hard on a set of decal functions . So far I've got a projecting mesh one which creates vertices by ray collision , and a project simple plane decal. However, I want a very accurate one which will be able to create multiple split parts of a decal if it hits multiple meshes, and I also need one that will properly work on skinned meshes. I'm close to finishing those too, but there's one hindrance:
So far I've used a lot of playmaker stuff as references, but I couldn't find a way to determine whether a certain vertex (or vector 3 (point)) is within a 3 dimensional cuboid (between 3 vector3 ) .
The reason why I'm asking here first is so that I know whether I should implement it as an action after I found a way. So far I'm considering something like the algebra 3 way I remember from school:
vec0 + s*vec1 + r*vec2 + t*vec3 = VecPoint
if r,s,t less than 1 and greater than 0, the point is in the cuboid, else it is not. (the vectors are not normalized)
I haven't been able to find a way to auto-calculate r , s and t though.
If this is not possible yet, let me know please, so I can add it as an action
(Though I'm not quite sure how to :S )