Download

How to get correct Absolute World Position in the shader after RotateAboutAxis

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
glass_border.jpg
*it is simple blueprint with two meshes, I will just show preview, because bp logic is outside of this topic
bp.jpg

Next step - I did shader “cutting/offset” outside vertices
glass_border_cutted.jpg
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:
glass_moved.jpg
glass_rotated.jpg
and combined move+rotate
glass_moved_rotated.jpg
material.png
*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
material_02.png
the results are:
1.jpg
2.jpg
3.jpg
4.jpg
5.jpg
6.jpg

I try Node “TransformPosition(Local Space to Absolute World Space)”, but it didn’t help me

What am I doing wrong?

try to get something like this: less than X_value(line param) -> blue, more than X_value -> red, after that I can modify correctly vertex offset
[ATTACH=JSON]{“data-align”:“none”,“data-size”:“full”,“data-tempid”:“temp_216402_1616427828942_190”,“title”:“8.png”}[/ATTACH]​​​[ATTACH=JSON]{“data-align”:“none”,“data-size”:“full”,“data-tempid”:“temp_216403_1616427857179_808”,“title”:“7.png”}[/ATTACH]​​​