flip camera viewport?

Blitz3D Forums/Blitz3D Programming/flip camera viewport?

shawnus(Posted 2003) [#1]
I have created a second camera (to look at a model) and a corrisponding viewport within the main screen. Is there any way of reversing the viewport image (ie. swapping left & right sides)? I can't just put the camera on the other side (of the model) because I am simulating an X-ray machine with an elevating table, so vertical movement of the table would produce the wrong effect on the monitor(the 2nd camera viewport). Hope this makes sense.
Cheers Shawnus


LAB[au](Posted 2003) [#2]
Don't know really what you need but you could try using camzoom with a minus(-) value. This will produce a flipped horizontaly and verticaly image. Then instead of moving the camera just rotate it of 180° on the Z axis. Maybe it does the trick.


EOF(Posted 2003) [#3]
Not tested but I think ScaleEntity cam,-1,1,1 works.


Anthony Flack(Posted 2003) [#4]
It does, but the normals get inverted, so you'll have to disable backface culling.


JaviCervera(Posted 2003) [#5]
Yes I hope Mark fixes the "flipped normals" bug in scaled cameras.


shawnus(Posted 2003) [#6]
Thanks all, I will try & let you know...
Cheers Shawnus


shawnus(Posted 2003) [#7]
It works like this:

scaleentity camera,-1,1,1
camerazoom camera,-1
rotateentity camera,0,0,180

normals are inverted, but it works fine. Thanks everyone.
Shawnus