- Home /
Resize halo effect
Hey guys!
I am trying to resize the halo effect of a sphere through javascript... is it possible?
Thank you :-)
Answer by GameRocker · Jun 22, 2015 at 03:06 PM
Hey u cant access halo component so the best option is to add a point light to the object , tick its Draw Halo option .and change culling mask to nothing . Then you change change the halo size by changing the range of light.
This worked perfectly for me, thanks! Here's a way I used it to animate it (I'm new so it's probably bad)
public class PickUp : $$anonymous$$onoBehaviour { public Light halo; private float speed; private void Start() { speed = 0.005f; } void FixedUpdate() { halo.range += speed; if (halo.range >= 1.2) { speed = -speed; } if (halo.range <= 0.8) { speed = -speed; } } }
Your answer
![](https://koobas.hobune.stream/wayback/20220613105215im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
[RE-Edited] How to get Neon Glow Effect without plugins?? 1 Answer
Resizing builtin arrays 2 Answers
How do I change the size of a UI Image? (Javascript) 0 Answers
Applying texture on a texture…? Click for more info 1 Answer
Particle Scaling 4 Answers