官术网_书友最值得收藏!

Collision Detection

Right now, our spaceships can fly around and shoot at each other, but nothing happens.

Collision detection is used in the vast majority of video games to determine whether game objects intersect. There are a large number of methods for detecting collisions between different game objects. Various methods can work better in different situations. There is also a trade-off between the amount of computation time and how accurate our collision detection will be. 

You will need to include several images in your build to make this project work. Make sure you include the /Chapter07/sprites/ folder from the project's GitHub. If you haven't yet downloaded the GitHub project, you can get it online here:  https://github.com/PacktPublishing/Hands-On-Game-Develop ment-with-WebAssembly.

In this chapter, we will discuss the following:

  • Collision detection
  • Collider objects
  • Types of colliders
  • Adding colliders to our game objects
主站蜘蛛池模板: 资源县| 民乐县| 满城县| 宁晋县| 南昌县| 鲁甸县| 大城县| 东台市| 开化县| 雷山县| 赤城县| 扶余县| 高州市| 沂水县| 桂东县| 湖南省| 河北区| 磴口县| 博野县| 城固县| 雅安市| 清丰县| 洪洞县| 灵寿县| 盈江县| 威海市| 元江| 大理市| 六安市| 阿合奇县| 额尔古纳市| 屯门区| 康马县| 樟树市| 垣曲县| 彩票| 万盛区| 呼伦贝尔市| 滦平县| 青田县| 铜梁县|