- Home /
Glow Effect on player unity
I am in a bit of dilemma here. I want to apply a glow effect to the player when he gets a powerup. I have applied a self illumination material to him and the "glow script" to main camera but the problem is everyone else that is in the scene is glowing too, which is ridiculous.
Now I have searched around but found no clear instructions on how to go about solving this problem.
Any help would be appreciated.
You will need 2 cameras. One to render the glowing player and the other to render the rest of the environment. Unless you have a glow shader that is able to do this, this is the only way to do it.
Yes but how do I make the one camera only render the player?
Duplicate the camera, that you are currently using to follow you'r player, (Remove the Audio Listener if it has one) and name it PlayerOnly_CA$$anonymous$$
Create a new Layer and call it "PlayerLayer"or something like that and add the player to that Layer
Select the new camera (PlayerOnly_Cam) and in the Camera attributes change:
Clear Flags - Depth Only
Culling $$anonymous$$ask - Deselect everything except "PlayerLayer".
Select your original camera and in the Culling $$anonymous$$ask menu deselect PlayerOnly;
Now in the game view you shoud see the same, but the PlayerOnly_CA$$anonymous$$ shoud only render the player and the other camera will render everything except the player...
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
volumetric light/sun shaft test 1 Answer
I've done something wrong in the tiling, any ideas? 1 Answer
Set Alpha cutoff Unity3d 1 Answer
Light glow effect test 3 Answers