- Home /
How to make a spawned healthbar not to cast shadow
Hello guys,
When activating the Unity PRO, I run into an unexpected issue with my healthbars for units. My healthbar is composed of two planes and floats over the head of my units (RTS game style).
The problem is that the light also draws shadows for these healthbars.
How can I force the healthbar not to cast shadows ?
you can put them on their own layer and tell light to ignore that layer.
Check out the culling mask here: http://docs.unity3d.com/Documentation/Components/class-Light.html
Yes, I tried this, but is not allowing me to change the layer. Here is how the object looks :
[I$$anonymous$$G]http://i44.tinypic.com/2em1on6.jpg[/I$$anonymous$$G]
Sorry, I can't check links at work. Are the healthbars a game object? I am not sure why you couldn't change the layer.
It is. I have the imported object area, where I can disable cast shadows and receive shadows and also change the layer. But that entire area is grayed out..
Answer by primus88 · Jul 25, 2013 at 02:40 PM
I forgot to post the solution. An object, like my health bar, has at the mesh render menu in the Inspector, two check options. Cast shadows on other objects and receive shadows. I just un-checked those two options.
In my case the problem was that I was trying to make this change to the parent, but it was imported and didn't allowed me. Instead, I un-checked it's child (the plane used to create the Hb)
Your answer
![](https://koobas.hobune.stream/wayback/20220613110359im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Can someone help me fix my Javascript for Flickering Light? 6 Answers
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Spotlights "turn off" a certain distance from camera? Possible Lab Renderer issue (maybe not). 0 Answers
Toon shader light culling shadow issue 0 Answers
Transforming Lightmaps at Runtime 1 Answer