I am quite happy with this update. A lot of things were accomplished in a few days time. Let's drink to that! Well, not now. Friday -- sure.
So what's new with the program?
- Windows mouse coordinates (which is 2D) transformation to OpenGl object coordinates. Think of it as clicking anywhere in the screen returns the exact object coordinates (3D) being clicked -- ray and object intersection. This was mainly accomplished with the help of the gluUnProject method.
- Mouse cursor in the form of a red katana. It's not very noticeable in the video. This is the biggest headache in this update. This needs good placement of push and pop matrices in the code. And it involves manipulation of projection and model view views. It WILL mess up gluUnProject if not invoked at the right place in the code. I learned this the hard way.
- Ninja movement in the direction of the mouse click. This is thanks to item 1, we now know where in the openGl world the mouse clicks. This involves transformations -- Linear math (Matrices)! Also, the transition moves between animations were added.
- Thanks again to #1, we now know where to put the Yin Yang animation!
- And lastly, Blending. Both the cursor and the Yin Yang symbol were blended. Notice how the Yin Yang vanish over time! It's because of blending.
Ok I forgot to level up Sensui. Uhm, level 5 now? Who cares? =)
The ninja is tired of walking. When is he gonna kick ass?
No comments:
Post a Comment