- Home /
How to mirror an object (reverse its sides)?
I've built a 3D model that is to be used in an application where it is projected on a mirror. This model will be viewed from the mirror so I need a way (a function) to mirror the object in Unity so that when it is projected on the mirror it will look in its proper orientation.
Answer by Demigiant · Oct 03, 2012 at 05:35 PM
You could just set its transform's X scale to -1, and rotate it accordingly.
O$$anonymous$$G! I'm so stupid. I was gona write a editor script to create a new model asset. Luckily I see this before I start. lol
this will cause normal map got flipped , it is not wise solution.
I used this to flip objects without any negative effects. Worked great.
Negative effects exists : negative scale - broken batching!
I used a parent with a negative scale and set the 'mirrored' model as child (I didn't want to scale the model directly). Are there still negative effects?
This works, only problem is if you have box colliders nested underneath them which may cause them to give a warning that you cannot use negative values on box collider scale values.
yeah, same problem. So how are you dealing with that if you need box colliders?
I think you have to build two collider and switch them
Answer by mike_kennedy989 · Apr 14, 2016 at 08:00 PM
How would one do this with a prefab hierarchy that's the child of a empty game object?