www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: Disastorm on July 03, 2011, 07:03:45 am

Title: how to use reflectionhelper?
Post by: Disastorm on July 03, 2011, 07:03:45 am
Hello I was just wondering how to use ReflectionHelper class (to make a mirror)?  I made a mirror myself which work kind of OK but they aren't as accurate as they should be so I wanna try out this class but Im not sure how to use it.

Do I just call the ReflectionHelper's drawScene method in my main loop, because that didn't seem to work for me.
Title: Re: how to use reflectionhelper?
Post by: EgonOlsen on July 03, 2011, 04:20:11 pm
The ReflectionHelper is only useful for planar reflections on a floor with an untilted camera. Is that, what you have in mind?
Title: Re: how to use reflectionhelper?
Post by: Disastorm on July 04, 2011, 10:19:20 am
ah i thoughtit was just planar in general.  so what you are saying is i cant make a plane on a wall and have the player look at it like a mirror using the ReflectionHelper?
Title: Re: how to use reflectionhelper?
Post by: EgonOlsen on July 04, 2011, 10:31:05 am
No, that's not what it's meant for.
Title: Re: how to use reflectionhelper?
Post by: Disastorm on July 06, 2011, 09:55:02 am
oh ok, whats the best way to make a mirror.  the way i used works alright except if i make the mirror really wide the image gets distorted to be wide.  I use a camera inside the mirror that renders to the mirror texture.
Title: Re: how to use reflectionhelper?
Post by: EgonOlsen on July 06, 2011, 10:17:45 am
Sounds reasonable to me. I don't have a better idea right now.
Title: Re: how to use reflectionhelper?
Post by: Disastorm on July 08, 2011, 10:16:17 pm
I managed to make it look not distorted by changing the FOV and the YFOV of the mirror's camera.