When youâre done with this chapter, you will
- Be able to stop game elements from moving through each other
- Understand collisions, which are important in gaming
- Have invisible fences around our trees
Chapter 10Project: Collisions
We have a slick game avatar. It moves, it walks, it even turns. But you may have noticed something unusual about our avatar. It can walk through trees.
Which is a little weird.
Code Almost Never Does What We Want | |
---|---|
Code does only what we tell it to do. All too often, it does the opposite of what we want it to do. This can ... |
Get 3D Game Programming for Kids, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.