I’m not really sure if something like this is even possible, but I thought I’d ask just to be sure:
To give some background, I have a Player Controller in a 2.5D side scroller I am making (2D Gameplay with 3D Assets). The game’s visual style is strongly based on silhouettes and emission.
So, what I want to achieve: is that I have various surfaces that have emissive values in their materials (but they are hidden by default) and I’d like them to light up when the player is close enough. But I don’t want the entire material and mesh to light up, only parts of the surface that are close to the player.
One example is that I have a log mesh and material that is driven along a spline. By default it is normal, but I can drive an alpha value that makes the crevices in the bark glow. But this affects the whole mesh, when really I’d like to be able to only make the surface that is close to the player glow, as opposed to the entire mesh.
That sounds like a plausible solution. Can you confirm that this would work? Really, all I need to do is be able to layer a disk shape over the surface when I’m close enough to it, then I can just use that as a mask. If that’s possible then I’m sure I could apply it.
And would you have any links on how to get the materials world position? I can’t say i have ever tried this before. So that would be a massive help, thanks!