How do I get a texture in a PostProcess material to follow my character around ?

I’m trying to have this ring texture:

follow my character by feeding it’s position to the ring material using a parameter collection in a post process material like so:

I’m struggling with the math and conversions required though, maybe someone could point me in the right direction ?
Thank you for your time !

Project world to screen and divide by resolution, that would give you uvs for your MID or MPC.

I’m still confused, I have mustered this abomination from your comment but i’m sure i’m far off of where I should be :


This results in nothing being displayed.

Ok, progress, I managed to convert the position of my character from world space to screen space like so:
Now to move the widget, if someone can help out please contribute !

now you should be able to use that value as uv’s for your texture in material. just offset it so texture will be sampled at the center of coordinates and scale it.

I’m trying but I’m not getting anywhere for now. I’ve tried a lot of screen space UVs combinations with no luck, the texture always looks stretched. I’m looking for some sort of example to guide me but I couldn’t find any.

Do you know how to control the panning/stretching of the texture in a clean way ?

i was wrong, that was offset for uv’s. here is working graph. you might want to set your texture tiling mode to clamp.

I’m almost there, this setup seems to almost work:


but the circle becomes bigger when the resolution decreases and smaller when it increases. I wish i was smart enough to know what I’m doing :slight_smile:
Please help if you can !

Gif of the problem in action here:

I completely missed your reply, that is indeed the correct way to do this, thank you very much !

Actually while your version is by far more sophisticated than mine it still have the same issue regarding texture scaling at different resolutions. What would you do to fix that ?

that seems too complicated for me to solve. could you use material billboard in your actor instead? that would make things easier. there was a way to disable depth sorting or just use world position offset towards camera.

That worked ! It was soo simple ! Thank you