Update Object Position on Local Grid

Hey,
first: sry for my bad english, it’s a mix of me and a translator

I hope you can help me here. I just do not get ahead.
What I want to achieve?

I would like the player can place an object, but only in a grid of 10. In addition I always round the position to a value of 10.
The Problem is, when i rotate the Object by 10°, 20°, 30°, etc. then it works not with the round correctly. The object should always be set only at 10 on his locale axis.

How do I get this?
With “Single LineI Trace by Channel” i take a position of the crosshair. I update the Graph with “Event Tick”.
But how do I get now the world coordinates of the local grids? I’ve already tried everything possible and calculated without end and find no solution.
I’ve already tried everything possible with “Vector Forward & Right” but can not make it.

Just transform everything to world space around the origin do some work and then move it back to grid space.

Maybe something like this? I assume you’re rotating around the origin, if not then you’ll have to offset everything from your local origin to work around the world origin doing the rotation.

Could you please enligthen me on this, How do I make it snap to nearest Z when it finds something blocking it’s way? and how make it back to lowest Z?