Before updating to Windows 10 you may need to return your Pro license. More information here

Flip/Mirror > Camera?

Is there a way to flip the Camera (let's say in X position), so the whole scene is "mirrored" for example to the right side,?

more ▼

asked Jun 23, 2010 at 07:07 AM

avatar image

100 65 53 59

(comments are locked)
10|3000 characters needed characters left

3 answers: sort voted first

You can use something like this (Once in start should do it):

Matrix4x4 mat = Camera.main.projectionMatrix;
mat *= Matrix4x4.Scale(new Vector3(-1, 1, 1));
Camera.main.projectionMatrix = mat;
more ▼

answered Jun 23, 2010 at 11:34 AM

avatar image

Mike 3
34.6k 28 156 319

i haven't tried it yet, need to give that to my programmer, and he is at work atm (got no time). i help him as good as i can and i am only a grafic artist with a bit knowledge about how things work.

  • so we are not talking about a render to texture method?

  • it really flips the whole view in x position?

  • Does it work on iphone too?

Jun 23, 2010 at 12:08 PM SOIL

Should do. Flips the camera horizontally on 2.6, and the same function is there for iphone. It's old style flipping, nothing fancy,should work on any computer

Jun 23, 2010 at 12:38 PM Mike 3

you are my god :D thnx!! is exactly that code the one which works on iphone too? xD

Jun 23, 2010 at 01:43 PM SOIL

Hello Mike, we tried the script now. It seems to work, but it flips the normal matrix of all objects. in play mode the camera is facing to the right direction. in game mode i recognize my objects areflipped. but it's like all normals where flipped too. Do you know how to fix that problem?

Aug 09, 2010 at 03:16 PM SOIL

Doesn't work... normals are also flipped so the mirrored camera renders objects something like inside-out, and terrain surfaces are not rendered at all.

Sep 10, 2010 at 10:37 PM Edy
(comments are locked)
10|3000 characters needed characters left

If you have render to texture (pro only) you could easily achieve this by rendering a texture and then flip that texture before it's displayed.

more ▼

answered Jun 23, 2010 at 11:04 AM

avatar image

6.6k 119 110 171

That's a solution for Animated Textures or so. What i need is a flip for right handed iphone users. the whole game-view shell be flipped, and the touch-matrix would be moved to the right position too. thing is my game works with on thumb. and the touchfield for it is atm on the left side. if i want to move the touchfield to the right side, i also have to flip the camera in x position, cause the game is strictly layouted on that way.

Jun 23, 2010 at 12:04 PM SOIL
(comments are locked)
10|3000 characters needed characters left
more ▼

answered Mar 11, 2011 at 04:10 AM

avatar image

118 10 7 34

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments



asked: Jun 23, 2010 at 07:07 AM

Seen: 9591 times

Last Updated: Jun 23, 2010 at 07:07 AM