For a prototype I’m working on, I created a dynamic texture to obtain a fog of war effect.
This texture is updated with a timer to display a brighter circle, origin being the position of my pawn.
I display this texture with a post process material using an Absolute World Position node.
My problem is :
How do I convert the Actor Position of my Pawn to the coordinates of the texture ?
Actually, I found empirically that dividing by 9.3 the Actor Position X and Y allow me to find the right point in the texture. But I can’t be happy with such an approximative solution
Actually, I found no ways of doing the “erasing” operation in a material.
The texture is updateded each time the character moves, and redrawn. The blendable material only owns the redrawn texture.
It is at the redrawing moment done in C++ code that I would need the World position to UV operation.
Is there any way of doing it outside of material edition ?