Efficient way to create character outline

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By CodeGuru12

I have a game I’m working on where I want to do object highlighting. Right now I’m using areas to detect when the player enters and leaves and using a shader to highlight an outline around the character. This works reasonably, but I have to attach a script to every one of the objects I want highlighting on to make it work.

Is there a more efficient way to do this that doesn’t require me to set up every single object with a next_pass shader material? Ideally I would just highlight stuff when the player is looking in their direction and close enough, so probably still need an area. But I have yet to figure out how to switch out materials, and I don’t even know if that’s efficient. Any ideas would be super appreciated. Thanks for your time.

:bust_in_silhouette: Reply From: umma

Click on the mesh and clcik “create mesh outline” above the 3d space.

It breaks the outlines tho. I guess I could easily edit it though.

CodeGuru12 | 2022-03-25 15:20