OnTriggerEnter/Effects question.

How to code like whenever I enter trigger there is some effects like changing the size of the trigger object or having a light behind it? just to emphasize that I am near it. Thanks alot!

anyone?

For changing the apparent size of the object, you can use the Transform.localScale field. As for lighting, I haven’t done any scripting with Unity’s built-in lights myself, but I imagine you could tweak the parameters of an attached light component to get the effect you want. If you want a ‘glow’ effect of some sort, there are various ways that can be achieved (search the forums for ‘glow’ for more info).

The code for this will most likely need to go (directly or indirectly) in the OnTriggerEnter() function (and perhaps the OnTriggerStay() and/or OnTriggerExit() functions as well) for either the player or the item in question.

thanks for the idea Jesse! :smile: