Make Our Avatar Flip!
Now that you have the avatar cartwheeling, try to make the avatar
flip, as well. You should use a value like is_flipping to control the
flipping. Hint: instead of avatar.rotation.z, try avatar.rotation.x or
avatar.rotation.y. Did you get it? If not, it’s OK. We’ll cover more of this
in later chapters.
4.7 The Code So Far
The entirety of the code will look something like the code in Section A1.3,
Code: Making an Avatar, on page 219.
Don’t worry if yours is not exactly like that code. Your code may be better or
just different.
3.8 What’s Next
We have a pretty cool-looking avatar. It might be nice for it to have a face or
clothes. But you know what would be even better? If we could move our avatar
with the keyboard. And that is just what we’ll do in Chapter 4, Project: Moving
Avatars, on page 35.
For now, take some time to play with the size, positioning, and rotation of
the parts that make up your avatar.
Chapter 3. Project: Making an Avatar • 34
Prepared exclusively for Michael Powell report erratum • discuss