Finally back after several weeks
of absence due to a family emergency. For the past few weeks, I had spent the
majority of my programming time working on 3 easy questions: number 2 the
robotic arm, number 4 the billboard and imposter trees, and number 6 the sky
dome.
 |
Robotic Arm |
The
robotic arm was by far the most tedious assignment that I have done so far, as
it took a lot of trial and error getting the exact position of each node and
each block correct. If the position was off even by a little bit, the rotation
would be incorrect and I would have to try another position for both the blocks
and the nodes. After creating and positioning all the blocks and nodes, the arm
was finally complete. I also added keyboard functions to allow the use to press
the keys 1-9 to move a specific joint in the robotic arm.
 |
Sky Dome |
The sky dome was
much easier to do, as you only need 2 lines of code for the sky dome to work. The
first line creates the sky dome, and initializes the size and position, and the
second line of code rotates the sky dome using a quaternion.
 |
Imposter tree (left) and Billboard tree (right) |
The billboard
and imposter trees were also slightly challenging to create, as I could not
figure out how to swap the textures of the trees at first. After successfully
creating an imposter tree using 2 intersecting planes and a billboard tree
using the built in Ogre3D function, I decided to move the part of the code that
sets the texture of the trees into the update function. This would allow the
textures of the trees to be changed at any time, depending on the keyboard
functions. Then I created keyboard functions that allowed the user to press the
1-3 keys and then change the texture of each tree.
Stay tuned for
more updates on my game engines progression!
No comments:
Post a Comment