Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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 Flisijn · Jun 23, 2013 at 05:30 PM · cameratexturesizefacing

Icon (object) always faces camera, stays same size and can be seen through all other things. How to?

I want to make an icon (texture on plane) located somewhere in the scene that always faces the camera, alway stays the same size (close look and far away) and can be seen through all things in the scene.

Someone got an idea how to achieve this? If scripting is neccesary; I'm using JavaScript so please write in JavaScript so I'll understand.

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

3 Replies

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

Answer by DaveA · Jun 23, 2013 at 06:39 PM

Use a GUITexture and position it using WorldToScreenPoint

or WorldToViewportPoint

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 Flisijn · Jun 24, 2013 at 06:39 AM 0
Share

This should work, thanks. Can you give me an example on how to achieve this?

I would like to position the GUI texture on a place where I put for example a cube so I can easily position the GUI texture.

avatar image
0

Answer by Eugenius · Jun 23, 2013 at 06:13 PM

Well, try creating your object, arrange it at the needed coordinates so your Camera can see it and in the Hierarchy tab make sure to make it a child of your Main Camera. Let me know if this helps :).

Also make sure to set up the rest of your scene slightly behind that object and it should work pretty good.

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 Flisijn · Jun 23, 2013 at 06:25 PM 0
Share

Sorry, it's not what I had in $$anonymous$$d. With facing the camera I ment a plane that rotates towards the camera (like the grass in the terrain editor). I also want the object to be seen through other objects, not by hiding the objects in front of it. Hope it's more clear now. Got any idea? Thanks for the help anyway!

avatar image
0

Answer by alpaca of zion · Jun 23, 2013 at 06:49 PM

To do this I would make a second camera. Set that camera as a child of the main camera. Set the culling mask to only show the object you are interested in. Last, set the depth of the second camera higher than the depth of the first camera. Camera Documentation will be helpful.

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 Flisijn · Jun 23, 2013 at 08:46 PM 0
Share

Thanks, got it working for a part. Only thing left is I need the object (for example a cube) to stay the same size in the view, even when you're hundred meters away from it. Like it's part of the GUI, but then in 3D space. Got an idea?

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.

Follow this Question

Answers Answers and Comments

18 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 avatar image avatar image

Related Questions

resolution of textures with camera distance? 0 Answers

Keep the width of a mesh always the same PIXEL size 1 Answer

Problem using multiple materials 0 Answers

Rotate parent object so that child is facing camera 0 Answers

How Do I Procedurally Generate Clouds ? 1 Answer


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