Hi guys!
I want to create a screen aligned effect to hint the player what direction to go by creating a flare spawning on the destination location.
Much like Damage Indicators
But Instead of using a Widget I am opting for a Post process material to visualize a flare.
Before explaining my issue I will first show you what I already have going on in my PP material
- CameraPos to ObjectPos Vector transformed to CameraSpace
- Screen UVs converted into polar coordinates and offsetted by the vector we just created
- Flare texture
- Fade effect when camera vector points away from the CameraPos to ObjectPos Vector
Here you can see the effect in action.
As the camera turns away the flare UV takes the vector to offset the UV This way the flare will repostion itself on the screen so that now the player knows where to turn. As the player starts looking towards the object the uv offset is reduced and the flare will be back in the center of the screen.
As I increase the FOV, more distortion is being introduced, as you may tell when the flare position doesnt match the object.
Does any of you know what I’m doing wrong? All i want is a screen aligned flare that is offseted with the camera direction so that (0,0) in my UV matches the object but the camera FOV seems to break it.