I made a cheap prototype of breakable glass, general idea is to use “crack mesh” instead of texture2d decals. The big visual issue is the edge of the glass, because “mesh cracks” goes beyond the glass border
*it is simple blueprint with two meshes, I will just show preview, because bp logic is outside of this topic
Next step - I did shader “cutting/offset” outside vertices
Because glass can be rotated to any angle, so I decided to use the standard way to “offset vertices”:
move object/vertices to (0,0,0) -> rotate object/vertices to (0,0,0) -> doing something with vertices -> rotate object/vertices to original object angle -> move object/vertices to original object angle
Move+Rotate works great:
and combined move+rotate
*in bp I send position, rotation and scale into shader (previously I did it by MPC)
But vertex transform…
And in this step I’m trying to get/visualize the World position of the vertices… and this is not what I expected
the results are:
I try Node “TransformPosition(Local Space to Absolute World Space)”, but it didn’t help me
What am I doing wrong?