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

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
主站蜘蛛池模板: 浦县| 汝城县| 闸北区| 沿河| 淮滨县| 抚顺市| 威宁| 万荣县| 鄱阳县| 察雅县| 天台县| 辰溪县| 兰州市| 德惠市| 思南县| 专栏| 禹州市| 盐亭县| 宁远县| 临夏县| 屏东市| 饶阳县| 房山区| 正定县| 讷河市| 繁昌县| 普兰店市| 黔东| 重庆市| 柘城县| 河曲县| 兴义市| 呼玛县| 固镇县| 永仁县| 登封市| 丹阳市| 江源县| 阿拉善左旗| 建平县| 平南县|