• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by CyberBlack · May 31, 2013 at 10:19 AM · glow

Looking at object and becomes brighter?

Okay so I'm making my game and i got opening doors and pick-up-able objects, and i want now let's say on doors, when i come close to them they start to glow on the edges like you selected, i have script to go to doors and then open them with mouse dragging, and i want to make when i go close to the door they start glow and the text says "Drag mouse to open doors" and same for objects but for objects to also glow but not with mouse, i got pages to pickup and i want to make them glow, if you understand what i mean, thanks!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by TonyLi · Jun 01, 2013 at 09:17 PM

Please read about shaders: http://docs.unity3d.com/Documentation/Manual/Shaders.html

Try manually changing the shader on your door in the editor to see how it changes appearance.

Once you find a shader you like, you'll have to write a script to change the door's shader whenever you approach or leave.

You'll use Physics for collision detection: http://docs.unity3d.com/Documentation/Manual/Physics.html

When your character approaches the door, it will send an OnTriggerEnter event, and an OnTriggerExit when you go away.

http://docs.unity3d.com/Documentation/ScriptReference/MonoBehaviour.OnTriggerEnter.html

In the OnTriggerEnter/Exit routines, set renderer.material.shader. The shader name can be tricky, as it uses the folder structure where the shader file is located. Example:

 void OnTriggerEnter() {
     renderer.material.shader = Shader.Find("Self-Illumin/Specular");
 }
Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image CyberBlack · Jun 02, 2013 at 10:25 AM 0
Share

Oh my god thank you this works!!!

avatar image
0

Answer by PAHeartBeat · May 31, 2013 at 12:09 PM

you can use collision detection. detect collision with door, once you get door in collision detection find the door is open or close, and regrading it show the message on the screen.

very easy task :)

Comment
Add comment · Show 8 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image CyberBlack · May 31, 2013 at 06:16 PM 0
Share

How about glowing

avatar image TonyLi · Jun 01, 2013 at 01:01 AM 0
Share

You could change the shader for the object while it's nearby. $$anonymous$$aybe a self-illu$$anonymous$$ated shader.

avatar image CyberBlack · Jun 01, 2013 at 08:36 AM 0
Share

Well i made some shader found on wiki but seems its not working, do you have some simple shader?

avatar image TonyLi · Jun 01, 2013 at 01:33 PM 0
Share

How about: http://docs.unity3d.com/Documentation/Components/shader-SelfIllumFamily.html

avatar image CyberBlack · Jun 01, 2013 at 06:41 PM 0
Share

I dont understand it :(

Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

16 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

glowing gui button 2 Answers

IOS Glow shader? 1 Answer

Light glow shader 1 Answer

Making glowing lines and shapes 1 Answer

Simple Shader: Pushing vertecies towards Camera 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges