• 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 /
This question was closed Nov 20, 2021 at 06:55 PM by Bmarlyman21 for the following reason:

Question is off-topic or not relevant

avatar image
0
Question by Bmarlyman21 · Mar 20, 2014 at 12:27 PM · invisible

How To Turn Invisible

I'm making a game with a multiplayer mode so real people can play, and one of my classes can turn invisible. I was wondering how to make it so that you can see your character partially, but the enemy can't see him at all.

Comment
Add comment · Show 2
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 trololo · Mar 20, 2014 at 12:51 PM 0
Share

If it's a 3D game, you can set the shader's alpha to a lower value (ex: 0.3 for you and 0 for the other players).

avatar image Bmarlyman21 · Mar 20, 2014 at 01:04 PM 0
Share

how do I make it different for me than for the other players?

2 Replies

  • Sort: 
avatar image
0

Answer by eran0201 · Mar 20, 2014 at 03:45 PM

For the enemy you can just change the Mesh Renderer setting so the object will become invisible

For your team that will make him partially I don't know

Comment
Add comment · Show 3 · 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 Bmarlyman21 · Mar 20, 2014 at 09:26 PM 0
Share

i know how to make an invisibility effect, i'm asking how to make 2 different ones, one that only the enemy sees (it would be completely invisible) and one that the player sees.

avatar image eran0201 · Mar 21, 2014 at 12:19 PM 0
Share

$$anonymous$$aybe set the player layer when he become invisibile to another layer and set two main cameras, one for your $$anonymous$$m lets say CameraTeam1 and CameraTeam2 and we will put 2 layers Inivisible1 and Invisible2

So CameraTeam1 cannot see the layer Invisible2 and CameraTeam2 cannot see the layer Inivisible1

avatar image Bmarlyman21 · May 01, 2014 at 08:27 PM 0
Share

thanks man!

avatar image
0

Answer by whydoidoit · Mar 21, 2014 at 12:59 PM

So for your other players, disable the MeshRenderer component.

For yourself there are two options, simple one - a coroutine that toggles the mesh renderer every frame so he flickers. Harder one, custom shader that renders him semi transparent by fiddling with the alpha value of the pixels being written (or find an existing alpha enabled shader and set the core colour to semi transparent).

     IEnumerator FlickerMe() {
          while(true) {
              renderer.enabled = !renderer.enabled;
              yield return null;
          }
     }

     void StartFlicker() {
         StartCoroutine("FlickerMe");
     }

     void StopFlicker() {
         StopCoroutine("FlickerMe");
         renderer.enabled = true;
     }
Comment
Add comment · 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

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

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

Related Questions

Renderer on object disabled after level reload 1 Answer

backface culling 1 Answer

No renderer at top level 1 Answer

Hiding part of mesh or texture 3 Answers

Invisibility/warp effect 2 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