Don't you hate those days where one little, minor,
itty-bitty problem can just ruin your day? The worst part is that the problem
isn't difficult, nor is it really important. Ugh!!!
My day started out pretty good. We were going to go to Gameworks
today so I was mentally prepared for a simple day, fix a few problems, do some
research, have lunch, solve another small problem, and that would be it.
Well, we didn't go to Gameworks (for good reasons). Fixed a
small bug in the cursor projection. Now we can add a ship anywhere on the
screen. Like this:
After lunch with some old Autodesk buddies, I decided to
work more on the AlexG zoom effect. This is where my day bit the dust. I must
have spent at least 4 hours that I didn't have on one simple effect that users
won't even notice.
The problem is that when you zoom in with the mouse wheel,
we want the mouse to stay centered over the zoomed object. In ALL other
programs, when you zoom in with the mouse, the point you zoomed into is
centered on the screen. I can see why now
In all the pictures below, pretend your mouse cursor is over
the ship and you try to zoom.
Since we're using an orthographic camera, there are two
elements in the view.
1) The view vector.
2) The view scale.
In an orthographic camera, the scale adjusts the zoom and
the view vector determines what we're looking at. The problem is that we're
linearly interpolating between the difference in the view vector and the view
scale. This causes some wonky curving effect. You'll have to see it to believe
it. Unfortunately, I can't grab a movie for you. Just trust me on this one. So
anyways, I solved the problem 3 different ways and each time the same effect
was occuring. So, I don't think it's the math. Ugh. We’ll probably just do
jumping from now on. No more AlexG effect. This wouldn't be a problem with a
Here's the basic scenario.
The dots represent the screen centers. The "inset"
is the target zoom level. Notice how the ship stays on the left side of the
screen. If anbody can give me a quick answer to this I’d greatly appreciate it J
Really, I can see both sides. I personally like the zoom to
Anyways, on a good note, this morning I spent some time with
Scott to get the new map into Political Machine. There's some more work to be
done to fully integrate it, especially with the icons, but it looks pretty damn
cool and Scott gave me 3 versions of the texture so we can experiment with
texture effects. Woohoo!! Thanks Scott.
That's it for now, it's getting late for me. If I go over my
list of to-do's for the week, It looks pretty sad. Really, I think Cari and I
got a lot of stuff done this week. Getting ready for that demo though, with one
week left, it'll be a stretch to get all the stuff in. Here comes an 80 hour
week I'm afraid.