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 superdave1318 · Jul 31, 2014 at 11:32 AM · textures

How do i make a mirror?

I am making a replica of my house inside unity and as the title sugguests, I need to find out how to make a mirror. I dont have unity pro, I dont want to have to buy an asset and I barely know the basics of scripting. The best i can think of is placing a camera in the mirror and having a texture display what the camera sees on the mirror, but i dont even know how to do that! Anyone care to help me?

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
0

Answer by fffMalzbier · Jul 31, 2014 at 11:50 AM

Without unity pro -> Rendertextures (The thing that is getting the image from a camera and put it into a texture) , you will no be able to have a mirror like you described easily.

There is some trickery that can be done like this

https://www.assetstore.unity3d.com/en/#!/content/8530

there may bee free packages too out there in the net if you have luck finding them.

Comment
Add comment · Show 2 · 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 Arcadewiz · Jul 31, 2014 at 11:59 AM 0
Share

I just came across this links, not tried them check if they help:

create mirror effect

avatar image superdave1318 · Jul 31, 2014 at 12:01 PM 0
Share

Ok well is there any reflective shader i can use?

avatar image
0

Answer by Cinder · Mar 24, 2015 at 03:49 PM

With Unity 5.0 personal/pro probes are now viable but still a bit meh in some conceptual ways. to get it to work as a mirror I used this script: var plane : GameObject; var character : GameObject;

  var offset : float;
  
  var directionFaced : Direction;
  
  function Update () {
  
      if(directionFaced == Direction.X){
          
          offset = (plane.transform.position.x - character.transform.position.x);
          
          transform.position.x = plane.transform.position.x + offset;
  
          transform.position.y = character.transform.position.y;
          transform.position.z = character.transform.position.z;
      }
      if(directionFaced == Direction.Y){
          
          offset = (plane.transform.position.y - character.transform.position.y);
          
          transform.position.x = character.transform.position.x;
          transform.position.y = plane.transform.position.y + offset;
          transform.position.z = character.transform.position.z;
      }
      if(directionFaced == Direction.Z){
          
          offset = (plane.transform.position.z - character.transform.position.z);
          
          transform.position.x = character.transform.position.x;
          transform.position.y = character.transform.position.y;
          transform.position.z = plane.transform.position.z + offset;
      }
  }
  
  //makes the possible directions 
  public enum Direction{
      X,Y,Z
  }

With the variable "plane" being the mirror surface and the "character" being the player's camera. There's a few other things I had to do to make this actually work and I go into step by step detail in the video here.

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

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

How to Best Implement a Tileset 1 Answer

Help?! Changing Textures via mouse click 1 Answer

Select an object, then change the texture 3 Answers

How to import the object from server to unity 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