- Home /
Mirrors of a car?
Hello, we all know the backward mirrors of a car :P
my question is, since i don't have unity pro and i am an absolute retard when it comes to understanding cubemaps, is it possible to hook a camera onto the mirror and projecting the camera's field of view as a backward mirror?
if yes, how is this done?
at the moment i'm trying it like this :
var Mirror : Camera;
var reflection : Cubemap;
reflection = Mirror.RenderToCubemap(reflection);
he'es expecting a boolean though and i don't get why.
Well, i've reviewed the code and now got this :
function Update ()
{
spiegelrechts.RenderToCubemap(spiegelmap);
rueckspiegel.Texture.Cubemap = spiegelmap;
//But i don't seem to get how to assign the cubemap to my mirror now.
}
Answer by Waz · Jul 29, 2011 at 08:29 AM
If you want mirrors in realtime without Pro, you can use multiple cameras. You'll need some kind of fancy maths to get the perfect matrix, or you can just tweak it until it looks good.
For non-realtime, do what you are doing above, but follow the documentation rather than your intuition ... or ask yourself why you would both pass a parameter and use the return value... with to same variable.
i don't get what you mean with the non-realtime, that is what i want to do but please stop speaking in riddles :S just tell me what i'm doing wrong please :)
You answered it yourself - don't use the return value. But yes, sorry, even the non-realtime RenderToCubemap is pro-only. The realtime option still applies.
No need to be sorry, but it'd be highly appreciated if you had a small example on how to do the realtime mirror effect with multiple cameras
I'm not riddling you, I'm criticising you for not reading the documentation before using a function.
i will read the doc next time, now gimme a cookie! just kidding, how would i do the realtime mirror effects using cameras?
is this done by using $$anonymous$$atrix4x4
?
Your answer
Follow this Question
Related Questions
Projecting camera view on to a right angled surface 1 Answer
How to turn a camera inversely from another camera (Similar to a realistic mirror)? 1 Answer
Showing an image from a camera in a projector?( i hope that is the right word ) 2 Answers
How to make camera position relative to a specific target. 1 Answer