Author Topic: how to use reflectionhelper?  (Read 3066 times)

Offline Disastorm

  • long
  • ***
  • Posts: 161
    • View Profile
how to use reflectionhelper?
« 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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: how to use reflectionhelper?
« Reply #1 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?

Offline Disastorm

  • long
  • ***
  • Posts: 161
    • View Profile
Re: how to use reflectionhelper?
« Reply #2 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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: how to use reflectionhelper?
« Reply #3 on: July 04, 2011, 10:31:05 am »
No, that's not what it's meant for.

Offline Disastorm

  • long
  • ***
  • Posts: 161
    • View Profile
Re: how to use reflectionhelper?
« Reply #4 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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: how to use reflectionhelper?
« Reply #5 on: July 06, 2011, 10:17:45 am »
Sounds reasonable to me. I don't have a better idea right now.

Offline Disastorm

  • long
  • ***
  • Posts: 161
    • View Profile
Re: how to use reflectionhelper?
« Reply #6 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.