my model is inverted when I zoom out ...
Hi, I have a problem with my zoom function which invert the scenewhen I go to far, I think it''s because it goes behind the eye, but whatever I''ve no idea on how to prevent from this.
If you want to see by yourself just click below
My Web Page
Your problem is very simple.
I think you are using glScale() isn''t it??
The problem is in negative scaling ratio.
scaling is defined like
SX = x * ration;
SY = y = ration....
so if the ratio is negative, the scene will invert.
you can prevent this by
eg:
if (ratio > 0)
ratio -= 0.05;
That''s all.
If you have an question just mail on dave007@volny.cz
Dave
I think you are using glScale() isn''t it??
The problem is in negative scaling ratio.
scaling is defined like
SX = x * ration;
SY = y = ration....
so if the ratio is negative, the scene will invert.
you can prevent this by
eg:
if (ratio > 0)
ratio -= 0.05;
That''s all.
If you have an question just mail on dave007@volny.cz
Dave
--------Dave[ Math Studio ] A Computer Algebra System
Oups ... I think you''re right , I can''t check it now ''cause I''m at work, but I''ll check it as soon I''m home.
Thanks !!
My Web Page
Thanks !!
My Web Page
If you''re doing a zoom (with a perspective projection), you should be changing the field of view (FOV) angle to achieve this. The smaller the FOV, the greater the zoom.
This freaky inversion problem can be caused by (i think) having a FOV that does not lie in the range 0 < FOV < 180(degrees)... i imagine that this is what the world would look like if you were a dragonfly (or on an incredible amount of smack )
------------------------------------------------------
"You need a weapon. Look around you... can you construct some sort of rudimentary lathe?"
- Guy Fleegman, Security Officer, NSEA Protector
This freaky inversion problem can be caused by (i think) having a FOV that does not lie in the range 0 < FOV < 180(degrees)... i imagine that this is what the world would look like if you were a dragonfly (or on an incredible amount of smack )
------------------------------------------------------
"You need a weapon. Look around you... can you construct some sort of rudimentary lathe?"
- Guy Fleegman, Security Officer, NSEA Protector
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement