ummm what

Started by
5 comments, last by medevilenemy 17 years, 11 months ago
ok, so i just had all my build files erased on my computer for some unkown reason, so im trying to rebuild everything. i have one problem.. i fixed it in my program, but i forget how to. and the problem is, how do i change the view of the "game" so that a value of 1 doesnt cover the entire screen. basically if i made a box, i want the size to be 10, and be able to see the whole thing. right now if i made a 1 x 1 x 1 box, it would do the same.
Advertisement
i'm afraid i have no idea what you are talking about. Might I suggest providing us with some more specific information?
There was a saying we had in college: Those who walk into the engineering building are never quite the same when they walk out.
ok
i want the value of 1.0f to equal 1 foot
so if i made a line, it would require a value of 10.0 to stretch across the whole screen.
right now, it looks like the value of 1 is equal to ten feet.
ah, that is a scaling issue. It can sometimes be rather hard to solve these... mainly because all one can base the numbers off of is a computerized rendering. <digs up sourcecode>

I know of a pair of functions that may help you. They are glPerspective() and glTranslated(). Do a google search for either one to determine how to use them/what they are intended to do (sorry, but i am really terrible at explaining things.)

There was a saying we had in college: Those who walk into the engineering building are never quite the same when they walk out.
If a unit line is 10ft, divide its length by 10 to make it 1ft long.

If the line doesn't start at 0, 0 on the origin, then subtract the line's start position from the end position to reorientate the line to start on 0, 0. Then do your translations, then add the original start position to the line's positions and it will go back to where it came from.

1 sub and 1 add per dimension, not bad.
wow, yea you were right, i was thinking maybe there was a glSCALE thing i forgot about, but it was just using translations....hahah, i feel dumb now...shoot
dont worry about it. We all make dumb mistakes occasionally. For example, when I was trying to get my game to run more smoothly on a wider range of machines, i basically lost all basic multiplication and division skills. (eventually the mistake was discovered and fixed with the help of people on this site :-))
There was a saying we had in college: Those who walk into the engineering building are never quite the same when they walk out.

This topic is closed to new replies.

Advertisement