HEOMirror
HEOMirror is placed with a Quad to implement a pseudo-mirror.
How to Use
TLDR
1.Prepare a Quad to be used as a mirror
2.Create Texture and Material
3.Attach HEOMirror to the Quad
Implementation
1. Prepare a Quad to be used as a mirror
Create a Quad by selecting Create > 3D Object.
As HEOMirror is categorized as a Node, the Quad must be a child object of the object with HEOField attached.
2. Create Texture and Material
Create a Texture which width/height is formatted as the power of 2.
For example, a square 1024*1024 texture is used here. Note that the texture does not have to be a square.
As the Texture is created, prepare a material as below:
If the intended Shader accepts textures, the material's shader does not have to be Unlit/Texture.
3. Attach HEOMirror to the Quad
Attach HEOMirror to the Quad. Make sure to select the Enable Mirror
.
By building world at this moment, the object will be a Mirror.
Tips
Enabling Mirror while the player is in the designated area
By attaching a Box Collider and HEOCollider, the mirror will be enabled only when the player is in the designated area. Set the HEOCollider's collider type to Area, and Collider Target to None.
If the Box Collider is not attached the mirror will be enabled regardless of player position.
Changing Material Colors
By using color changeable shaders such as standard, the color tone on the mirror's image will change.
Using the same material of HEOMirror's object on other objects
Unlike video players, the same material on a different object will not display the mirror image, as only the object with HEOMirror will be a mirror.
Placing Multiple Mirrors
The object with HEOMirror attached will not be displayed in another HEOMirror.?
Therefore, if two or more mirrors are faced, each image will not be displayed on the other, and will show the scenery behind the mirror.
Example: Placing 8 Quads with HEOMirror, each rotated 45°
Performance when placing Mirrors
If multiple mirrors are placed with video playing in the mirror's vicinity, it may result to poorer performance on smartphones. Please consider the positions when placing mirrors.