Download

Apply texture on mesh from a world position point

Hi !

I’m working on a game in which we have a 3D character followed by a kind of 2D sidekick, which is a draw on a wall.

I am trying to make a material that we allow, from a world position and a size, to render this character and being able to move him on different mesh


Currently, I have a solution but it causes issues like my texture being applied on all the surfaces along the Y axis.

and the texture is stretching when a surface is parallel with Y axis.

I’m trying to tweak my material to mask all these issues, but I think I’m doing it wrong. There should be a easiest solution…

Should I continue with my method ? Or maybe there is a better way to do it ?

Here is my material blueprint, if you’ve got any idea…

It sounds very difficult to do something that will allways look ‘right’ or how maybe you imagined it.
To further explore your concept why don’t you use a Decal instead?
That would be very similar in that it would be a projection onto a surface with a transform. You can then easily move it around by hand to interactively see how it behaves.

I don’t think you could do something that allways wrapped around various corners correctly etc.
I think you have to decide first conceptually how you want it to ‘project’ on your various walls in all the different situations you can have and then try to figure out if that is possible.

Yes, a Decal was exactly what I was looking for… I just missed it when I was looking at the Unreal Doc…
Thanks a lot !