- Home /
Question by
Skibur · Nov 24, 2013 at 08:26 AM ·
texture2dmirrorsprite renderermirrorreflection
Render Texture2D mirrored horizontally
Hi guys, Working on a custom script here, where it involves something similar to a mirror reflections. How can I render a mirrored image from the camera? I don't want to be able to create another GameObject and then have it scaled accordingly to get the image flipped horizontally.
Is there a better ways to code the image flipped horizontally?
Comment
Answer by Patrykgazing · Nov 24, 2013 at 12:46 PM
Just add "-" in the front of horizontal size:
GUI.DrawTexture(new Rect(100,100,-100,100),texture);
It has to be Texture2D. Can't be GUI or any new empty gameobject.